Method CreateConstant
CreateConstant(bool)
Creates a new ConstantInt with a bit length of 1
public ConstantInt CreateConstant(bool constValue)
Parameters
constValueboolValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(byte)
Creates a new ConstantInt with a bit length of 8
public ConstantInt CreateConstant(byte constValue)
Parameters
constValuebyteValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(sbyte)
Creates a new ConstantInt with a bit length of 8
public Constant CreateConstant(sbyte constValue)
Parameters
constValuesbyteValue for the constant
Returns
- Constant
ConstantInt representing the value
CreateConstant(short)
Creates a new ConstantInt with a bit length of 16
public ConstantInt CreateConstant(short constValue)
Parameters
constValueshortValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(ushort)
Creates a new ConstantInt with a bit length of 16
public ConstantInt CreateConstant(ushort constValue)
Parameters
constValueushortValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(int)
Creates a new ConstantInt with a bit length of 32
public ConstantInt CreateConstant(int constValue)
Parameters
constValueintValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(uint)
Creates a new ConstantInt with a bit length of 32
public ConstantInt CreateConstant(uint constValue)
Parameters
constValueuintValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(long)
Creates a new ConstantInt with a bit length of 64
public ConstantInt CreateConstant(long constValue)
Parameters
constValuelongValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(ulong)
Creates a new ConstantInt with a bit length of 64
public ConstantInt CreateConstant(ulong constValue)
Parameters
constValueulongValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(uint, ulong, bool)
Creates a new ConstantInt with a bit length of 64
public ConstantInt CreateConstant(uint bitWidth, ulong constValue, bool signExtend)
Parameters
bitWidthuintBit width of the integer
constValueulongValue for the constant
signExtendboolflag to indicate if the constant value should be sign extended
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(ITypeRef, ulong, bool)
Create a constant value of the specified integer type
public ConstantInt CreateConstant(ITypeRef intType, ulong constValue, bool signExtend)
Parameters
intTypeITypeRefInteger type
constValueulongvalue
signExtendboolflag to indicate if
constValueis sign extended
Returns
- ConstantInt
Constant for the specified value
CreateConstant(float)
Creates a constant floating point value for a given value
public ConstantFP CreateConstant(float constValue)
Parameters
constValuefloatValue to make into a ConstantFP
Returns
- ConstantFP
Constant value
CreateConstant(double)
Creates a constant floating point value for a given value
public ConstantFP CreateConstant(double constValue)
Parameters
constValuedoubleValue to make into a ConstantFP
Returns
- ConstantFP
Constant value