IRConstant
public protocol IRConstant : IRValue
An IRConstant is an entity whose value doees not change during the
runtime of a program. This includes global variables and functions, whose
addresses are constant, and constant expressions.
-
constGEP(indices:Extension method) Perform a GEP (Get Element Pointer) with this value as the base.
Declaration
Swift
public func constGEP(indices: [IRConstant]) -> IRConstantParameters
indicesA list of indices that indicate which of the elements of the aggregate object are indexed.
Return Value
A value representing the address of a subelement of the given aggregate data structure value.
-
bitCast(to:Extension method) Build a constant bitcast to convert the given value to a value of the given type by just copying the bit pattern.
Declaration
Swift
public func bitCast(to type: IRType) -> IRConstantParameters
typeThe destination type.
Return Value
A constant value representing the result of bitcasting this constant value to fit the given type.
IRConstant Protocol Reference