Method CreateConstant
CreateConstant(Boolean)
Creates a new ConstantInt with a bit length of 1
Declaration
public Constant CreateConstant(bool constValue)
Parameters
public Constant CreateConstant(bool constValue)
Boolean | constValue | Value for the constant |
Returns
Constant | ConstantInt representing the value |
CreateConstant(Byte)
Creates a new ConstantInt with a bit length of 8
Declaration
public Constant CreateConstant(byte constValue)
Parameters
public Constant CreateConstant(byte constValue)
Byte | constValue | Value for the constant |
Returns
Constant | ConstantInt representing the value |
CreateConstant(SByte)
Creates a new ConstantInt with a bit length of 8
Declaration
public Constant CreateConstant(sbyte constValue)
Parameters
public Constant CreateConstant(sbyte constValue)
SByte | constValue | Value for the constant |
Returns
Constant | ConstantInt representing the value |
CreateConstant(Int16)
Creates a new ConstantInt with a bit length of 16
Declaration
public Constant CreateConstant(short constValue)
Parameters
public Constant CreateConstant(short constValue)
Int16 | constValue | Value for the constant |
Returns
Constant | ConstantInt representing the value |
CreateConstant(UInt16)
Creates a new ConstantInt with a bit length of 16
Declaration
public Constant CreateConstant(ushort constValue)
Parameters
public Constant CreateConstant(ushort constValue)
UInt16 | constValue | Value for the constant |
Returns
Constant | ConstantInt representing the value |
CreateConstant(Int32)
Creates a new ConstantInt with a bit length of 32
Declaration
public Constant CreateConstant(int constValue)
Parameters
public Constant CreateConstant(int constValue)
Int32 | constValue | Value for the constant |
Returns
Constant | ConstantInt representing the value |
CreateConstant(UInt32)
Creates a new ConstantInt with a bit length of 32
Declaration
public Constant CreateConstant(uint constValue)
Parameters
public Constant CreateConstant(uint constValue)
UInt32 | constValue | Value for the constant |
Returns
Constant | ConstantInt representing the value |
CreateConstant(Int64)
Creates a new ConstantInt with a bit length of 64
Declaration
public Constant CreateConstant(long constValue)
Parameters
public Constant CreateConstant(long constValue)
Int64 | constValue | Value for the constant |
Returns
Constant | ConstantInt representing the value |
CreateConstant(UInt64)
Creates a new ConstantInt with a bit length of 64
Declaration
public Constant CreateConstant(ulong constValue)
Parameters
public Constant CreateConstant(ulong constValue)
UInt64 | constValue | Value for the constant |
Returns
Constant | ConstantInt representing the value |
CreateConstant(UInt32, UInt64, Boolean)
Creates a new ConstantInt with a bit length of 64
Declaration
public Constant CreateConstant(uint bitWidth, ulong constValue, bool signExtend)
Parameters
public Constant CreateConstant(uint bitWidth, ulong constValue, bool signExtend)
UInt32 | bitWidth | Bit width of the integer |
UInt64 | constValue | Value for the constant |
Boolean | signExtend | flag to indicate if the constant value should be sign extended |
Returns
Constant | ConstantInt representing the value |
CreateConstant(ITypeRef, UInt64, Boolean)
Create a constant value of the specified integer type
Declaration
public Constant CreateConstant(ITypeRef intType, ulong constValue, bool signExtend)
Parameters
public Constant CreateConstant(ITypeRef intType, ulong constValue, bool signExtend)
ITypeRef | intType | Integer type |
UInt64 | constValue | value |
Boolean | signExtend | flag to indicate if |
Returns
Constant | Constant for the specified value |
CreateConstant(Single)
Creates a constant floating point value for a given value
Declaration
public ConstantFP CreateConstant(float constValue)
Parameters
public ConstantFP CreateConstant(float constValue)
Single | constValue | Value to make into a ConstantFP |
Returns
ConstantFP | Constant value |
CreateConstant(Double)
Creates a constant floating point value for a given value
Declaration
public ConstantFP CreateConstant(double constValue)
Parameters
public ConstantFP CreateConstant(double constValue)
Double | constValue | Value to make into a ConstantFP |
Returns
ConstantFP | Constant value |