llvm::DataLayout::getGEPIndicesForOffset

Get GEP indices to access Offset inside ElemTy.

Synopsis

Declared in <llvm/IR/DataLayout.h>

SmallVector<APInt>
getGEPIndicesForOffset(
    Type*& ElemTy,
    APInt& Offset) const;

Description

ElemTy is updated to be the result element type and Offset to be the residual offset.

Return Value

GEP indices to access Offset inside ElemTy.

Parameters

NameDescription
ElemTyElement type being indexed into; updated to the result type.
OffsetByte offset into ElemTy; updated to any residual offset.