llvm::Constant::getAggregateElement

Return the constant for the specified aggregate element, or null.

Synopsis

Declared in <llvm/IR/Constant.h>

Constant*
getAggregateElement(unsigned int Elt) const;

Description

For aggregates (struct/array/vector) return the constant that corresponds to the specified element if possible, or null if not. This can return null if the element index is a ConstantExpr, if 'this' is a constant expr or if the constant does not fit into an uint64_t.

Return Value

The constant for the element, or null if unavailable.

Parameters

NameDescription
EltZero-based element index.