Method CreateConstantStruct
CreateConstantStruct(Boolean, Constant[])
Creates a constant structure from a set of values
Declaration
public Constant CreateConstantStruct(bool packed, params Constant[] values)
Parameters
public Constant CreateConstantStruct(bool packed, params Constant[] values)
Boolean | packed | Flag to indicate if the structure is packed and no alignment should be applied to the members |
Constant[] | values | Set of values to use in forming the structure |
Returns
Constant | Newly created Constant |
Remarks
The actual concrete return type depends on the parameters provided and will be one of the following:
Constant derived type | Description |
---|---|
ConstantAggregateZero | If all the member values are zero constants |
UndefValue | If all the member values are UndefValue |
ConstantStruct | All other cases |
CreateConstantStruct(Boolean, IEnumerable<Constant>)
Creates a constant structure from a set of values
Declaration
public Constant CreateConstantStruct(bool packed, IEnumerable<Constant> values)
Parameters
public Constant CreateConstantStruct(bool packed, IEnumerable<Constant> values)
Boolean | packed | Flag to indicate if the structure is packed and no alignment should be applied to the members |
IEnumerable<Constant> | values | Set of values to use in forming the structure |
Returns
Constant | Newly created Constant |
Remarks
note
The actual concrete return type depends on the parameters provided and will be one of the following:
Constant derived type | Description |
---|---|
ConstantAggregateZero | If all the member values are zero constants |
UndefValue | If all the member values are UndefValue |
ConstantStruct | All other cases |