Method CreateConstant
CreateConstant(bool)
Creates a new ConstantInt with a bit length of 1
ConstantInt CreateConstant(bool constValue)
Parameters
constValue
boolValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(byte)
Creates a new ConstantInt with a bit length of 8
ConstantInt CreateConstant(byte constValue)
Parameters
constValue
byteValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(sbyte)
Creates a new ConstantInt with a bit length of 8
Constant CreateConstant(sbyte constValue)
Parameters
constValue
sbyteValue for the constant
Returns
- Constant
ConstantInt representing the value
CreateConstant(short)
Creates a new ConstantInt with a bit length of 16
ConstantInt CreateConstant(short constValue)
Parameters
constValue
shortValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(ushort)
Creates a new ConstantInt with a bit length of 16
ConstantInt CreateConstant(ushort constValue)
Parameters
constValue
ushortValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(int)
Creates a new ConstantInt with a bit length of 32
ConstantInt CreateConstant(int constValue)
Parameters
constValue
intValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(uint)
Creates a new ConstantInt with a bit length of 32
ConstantInt CreateConstant(uint constValue)
Parameters
constValue
uintValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(long)
Creates a new ConstantInt with a bit length of 64
ConstantInt CreateConstant(long constValue)
Parameters
constValue
longValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(ulong)
Creates a new ConstantInt with a bit length of 64
ConstantInt CreateConstant(ulong constValue)
Parameters
constValue
ulongValue for the constant
Returns
- ConstantInt
ConstantInt representing the value
CreateConstant(uint, ulong, bool)
Creates a new ConstantInt with a bit length of 64
ConstantInt CreateConstant(uint bitWidth, ulong constValue, bool signExtend)
Parameters
bitWidth
uintBit width of the integer
constValue
ulongValue for the constant
signExtend
boolflag 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
ConstantInt CreateConstant(ITypeRef intType, ulong constValue, bool signExtend)
Parameters
intType
ITypeRefInteger type
constValue
ulongvalue
signExtend
boolflag to indicate if
constValue
is sign extended
Returns
- ConstantInt
Constant for the specified value
CreateConstant(float)
Creates a constant floating point value for a given value
ConstantFP CreateConstant(float constValue)
Parameters
constValue
floatValue to make into a ConstantFP
Returns
- ConstantFP
Constant value
CreateConstant(double)
Creates a constant floating point value for a given value
ConstantFP CreateConstant(double constValue)
Parameters
constValue
doubleValue to make into a ConstantFP
Returns
- ConstantFP
Constant value