llvm::ConstantFoldLoadFromConstPtr

Return the value that a load from C with offset Offset would produce if it is constant and determinable. If this is not determinable, return null.

Synopsis

Declared in <llvm/Analysis/ConstantFolding.h>

Constant*
ConstantFoldLoadFromConstPtr(
    Constant* C,
    Type* Ty,
    APInt Offset,
    DataLayout const& DL);

Return Value

The loaded constant of type Ty, or null if not determinable.

Parameters

NameDescription
CPointer constant being loaded from.
TyType of the load result.
OffsetByte offset from C at which to load.
DLData layout used for type sizes and pointer widths.