llvm::ComputeLinearIndex

Compute the linearized index of a member in a nested aggregate.

Synopsis

Declared in <llvm/CodeGen/Analysis.h>

unsigned int
ComputeLinearIndex(
    Type* Ty,
    ArrayRef<unsigned int> Indices,
    unsigned int CurIndex = 0);

Return Value

The linearized index of the member identified by Indices.

Parameters

NameDescription
TyAggregate type indexed by Indices.
IndicesSequence of insertvalue or extractvalue indices.
CurIndexCurrent index used as the recursion base.