Method CreateConstant
CreateConstant(Boolean)
Creates a new ConstantInt with a bit length of 1
Declaration
public ConstantInt CreateConstant(bool constValue)
Parameters
public ConstantInt CreateConstant(bool constValue)
Boolean | constValue | Value for the constant |
Returns
ConstantInt | ConstantInt representing the value |
CreateConstant(Byte)
Creates a new ConstantInt with a bit length of 8
Declaration
public ConstantInt CreateConstant(byte constValue)
Parameters
public ConstantInt CreateConstant(byte constValue)
Byte | constValue | Value for the constant |
Returns
ConstantInt | 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 ConstantInt CreateConstant(short constValue)
Parameters
public ConstantInt CreateConstant(short constValue)
Int16 | constValue | Value for the constant |
Returns
ConstantInt | ConstantInt representing the value |
CreateConstant(UInt16)
Creates a new ConstantInt with a bit length of 16
Declaration
public ConstantInt CreateConstant(ushort constValue)
Parameters
public ConstantInt CreateConstant(ushort constValue)
UInt16 | constValue | Value for the constant |
Returns
ConstantInt | ConstantInt representing the value |
CreateConstant(Int32)
Creates a new ConstantInt with a bit length of 32
Declaration
public ConstantInt CreateConstant(int constValue)
Parameters
public ConstantInt CreateConstant(int constValue)
Int32 | constValue | Value for the constant |
Returns
ConstantInt | ConstantInt representing the value |
CreateConstant(UInt32)
Creates a new ConstantInt with a bit length of 32
Declaration
public ConstantInt CreateConstant(uint constValue)
Parameters
public ConstantInt CreateConstant(uint constValue)
UInt32 | constValue | Value for the constant |
Returns
ConstantInt | ConstantInt representing the value |
CreateConstant(Int64)
Creates a new ConstantInt with a bit length of 64
Declaration
public ConstantInt CreateConstant(long constValue)
Parameters
public ConstantInt CreateConstant(long constValue)
Int64 | constValue | Value for the constant |
Returns
ConstantInt | ConstantInt representing the value |
CreateConstant(UInt64)
Creates a new ConstantInt with a bit length of 64
Declaration
public ConstantInt CreateConstant(ulong constValue)
Parameters
public ConstantInt CreateConstant(ulong constValue)
UInt64 | constValue | Value for the constant |
Returns
ConstantInt | ConstantInt representing the value |
CreateConstant(UInt32, UInt64, Boolean)
Creates a new ConstantInt with a bit length of 64
Declaration
public ConstantInt CreateConstant(uint bitWidth, ulong constValue, bool signExtend)
Parameters
public ConstantInt 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
ConstantInt | ConstantInt representing the value |
CreateConstant(ITypeRef, UInt64, Boolean)
Create a constant value of the specified integer type
Declaration
public ConstantInt CreateConstant(ITypeRef intType, ulong constValue, bool signExtend)
Parameters
public ConstantInt CreateConstant(ITypeRef intType, ulong constValue, bool signExtend)
ITypeRef | intType | Integer type |
UInt64 | constValue | value |
Boolean | signExtend | flag to indicate if |
Returns
ConstantInt | 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 |