Module composite

Source
Expand description

Functions in this group operate on composite constants.

Functions§

const_array2
Create a ConstantArray from values.
const_named_struct
Create a non-anonymous ConstantStruct from values.
const_string
Create a ConstantDataSequential with string content in the global context.
const_string_in_context2
Create a ConstantDataSequential and initialize it with a string.
const_struct
Create a ConstantStruct in the global Context.
const_struct_in_context
Create an anonymous ConstantStruct with the specified values.
const_vector
Create a ConstantVector from values.
get_aggregate_element
Get element of a constant aggregate (struct, array or vector) at the specified index. Returns None if the index is out of range, or it’s not possible to determine the element (e.g., because the constant is a constant expression.)
get_as_string
Get the given constant data sequential as a string.
is_constant_string
Returns true if the specified constant is an array of i8.