llvm::getConstantDataArrayInfo

Returns true if the value V is a pointer into a ConstantDataArray. If successful Slice will point to a ConstantDataArray info object with an appropriate offset.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

bool
getConstantDataArrayInfo(
    Value const* V,
    ConstantDataArraySlice& Slice,
    unsigned int ElementSize,
    uint64_t Offset = 0);

Return Value

True if V points into a ConstantDataArray (or zeroinitializer).

Parameters

NameDescription
VPointer value that may address a constant data array.
SliceOutput slice describing the constant data region.
ElementSizeSize in bits of each array element.
OffsetAdditional byte offset applied before matching.