llvm::ValueLatticeElement::markConstantRange

Mark this lattice element as constant range NewR.

Synopsis

Declared in <llvm/Analysis/ValueLattice.h>

bool
markConstantRange(
    ConstantRange NewR,
    MergeOptions Opts = MergeOptions());

Description

If the object is already a constant range, nothing changes if the existing range is equal to NewR and the tag. Otherwise NewR must be a superset of the existing range or the object must be undef. The tag is set to constant_range_including_undef if either the existing value or the new range may include undef.

Return Value

True if the state changed.

Parameters

NameDescription
NewRConstant range to set.
OptsOptions controlling undef inclusion and widening.