|
LLVM 23.0.0git
|
Functions in this group model LLVMValueRef instances that correspond to constants referring to scalar types. More...
Functions | |
| LLVM_C_ABI LLVMValueRef | LLVMConstInt (LLVMTypeRef IntTy, unsigned long long N, LLVMBool SignExtend) |
| Obtain a constant value for an integer type. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstIntOfArbitraryPrecision (LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[]) |
| Obtain a constant value for an integer of arbitrary precision. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstIntOfString (LLVMTypeRef IntTy, const char *Text, uint8_t Radix) |
| Obtain a constant value for an integer parsed from a string. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstIntOfStringAndSize (LLVMTypeRef IntTy, const char *Text, unsigned SLen, uint8_t Radix) |
| Obtain a constant value for an integer parsed from a string with specified length. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstByte (LLVMTypeRef ByteTy, unsigned long long N) |
| Obtain a constant value for a byte type. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstByteOfArbitraryPrecision (LLVMTypeRef ByteTy, unsigned NumWords, const uint64_t Words[]) |
| Obtain a constant value for a byte of arbitrary precision. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstByteOfStringAndSize (LLVMTypeRef ByteTy, const char *Text, size_t SLen, uint8_t Radix) |
| Obtain a constant value for a byte parsed from a string with specified length. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstReal (LLVMTypeRef RealTy, double N) |
| Obtain a constant value referring to a double floating point value. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstRealOfString (LLVMTypeRef RealTy, const char *Text) |
| Obtain a constant for a floating point value parsed from a string. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstRealOfStringAndSize (LLVMTypeRef RealTy, const char *Text, unsigned SLen) |
| Obtain a constant for a floating point value parsed from a string. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstFPFromBits (LLVMTypeRef Ty, const uint64_t N[]) |
| Obtain a constant for a floating point value from array of 64 bit values. | |
| LLVM_C_ABI unsigned long long | LLVMConstIntGetZExtValue (LLVMValueRef ConstantVal) |
| Obtain the zero extended value for an integer constant value. | |
| LLVM_C_ABI long long | LLVMConstIntGetSExtValue (LLVMValueRef ConstantVal) |
| Obtain the sign extended value for an integer constant value. | |
| LLVM_C_ABI unsigned long long | LLVMConstByteGetZExtValue (LLVMValueRef ConstantVal) |
| Obtain the zero extended value for a byte constant value. | |
| LLVM_C_ABI long long | LLVMConstByteGetSExtValue (LLVMValueRef ConstantVal) |
| Obtain the sign extended value for a byte constant value. | |
| LLVM_C_ABI double | LLVMConstRealGetDouble (LLVMValueRef ConstantVal, LLVMBool *losesInfo) |
| Obtain the double value for an floating point constant value. | |
Functions in this group model LLVMValueRef instances that correspond to constants referring to scalar types.
For integer types, the LLVMTypeRef parameter should correspond to a llvm::IntegerType instance and the returned LLVMValueRef will correspond to a llvm::ConstantInt.
For floating point types, the LLVMTypeRef returned corresponds to a llvm::ConstantFP.
| LLVM_C_ABI LLVMValueRef LLVMConstByte | ( | LLVMTypeRef | ByteTy, |
| unsigned long long | N ) |
Obtain a constant value for a byte type.
The returned value corresponds to a llvm::ConstantByte.
| ByteTy | Byte type to obtain value of. |
| N | The value the returned instance should refer to. |
Definition at line 1593 of file Core.cpp.
References N, llvm::unwrap(), and llvm::wrap().
Referenced by LLVMConstIntOfStringAndSize().
| LLVM_C_ABI long long LLVMConstByteGetSExtValue | ( | LLVMValueRef | ConstantVal | ) |
Obtain the sign extended value for a byte constant value.
Definition at line 1650 of file Core.cpp.
References llvm::unwrap().
Referenced by LLVMConstRealOfStringAndSize().
| LLVM_C_ABI unsigned long long LLVMConstByteGetZExtValue | ( | LLVMValueRef | ConstantVal | ) |
Obtain the zero extended value for a byte constant value.
Definition at line 1646 of file Core.cpp.
References llvm::unwrap().
Referenced by LLVMConstRealOfStringAndSize().
| LLVM_C_ABI LLVMValueRef LLVMConstByteOfArbitraryPrecision | ( | LLVMTypeRef | ByteTy, |
| unsigned | NumWords, | ||
| const uint64_t | Words[] ) |
Obtain a constant value for a byte of arbitrary precision.
Definition at line 1597 of file Core.cpp.
References llvm::unwrap(), and llvm::wrap().
Referenced by LLVMConstIntOfStringAndSize().
| LLVM_C_ABI LLVMValueRef LLVMConstByteOfStringAndSize | ( | LLVMTypeRef | ByteTy, |
| const char * | Text, | ||
| size_t | SLen, | ||
| uint8_t | Radix ) |
Obtain a constant value for a byte parsed from a string with specified length.
References const, LLVM_C_ABI, LLVMConstByteOfStringAndSize(), LLVMConstReal(), LLVMConstRealOfString(), and N.
Referenced by LLVMConstByteOfStringAndSize().
| LLVM_C_ABI LLVMValueRef LLVMConstFPFromBits | ( | LLVMTypeRef | Ty, |
| const uint64_t | N[] ) |
Obtain a constant for a floating point value from array of 64 bit values.
The length of the array N must be ceildiv(bits, 64), where bits is the scalar size in bits of the floating-point type.
Definition at line 1630 of file Core.cpp.
References llvm::divideCeil(), N, T, llvm::unwrap(), and llvm::wrap().
Referenced by LLVMConstRealOfStringAndSize().
| LLVM_C_ABI LLVMValueRef LLVMConstInt | ( | LLVMTypeRef | IntTy, |
| unsigned long long | N, | ||
| LLVMBool | SignExtend ) |
Obtain a constant value for an integer type.
The returned value corresponds to a llvm::ConstantInt.
| IntTy | Integer type to obtain value of. |
| N | The value the returned instance should refer to. |
| SignExtend | Whether to sign extend the produced value. |
Definition at line 1568 of file Core.cpp.
References N, llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI long long LLVMConstIntGetSExtValue | ( | LLVMValueRef | ConstantVal | ) |
Obtain the sign extended value for an integer constant value.
Definition at line 1642 of file Core.cpp.
References llvm::unwrap().
Referenced by LLVMConstRealOfStringAndSize().
| LLVM_C_ABI unsigned long long LLVMConstIntGetZExtValue | ( | LLVMValueRef | ConstantVal | ) |
Obtain the zero extended value for an integer constant value.
Definition at line 1638 of file Core.cpp.
References llvm::unwrap().
Referenced by LLVMConstRealOfStringAndSize().
| LLVM_C_ABI LLVMValueRef LLVMConstIntOfArbitraryPrecision | ( | LLVMTypeRef | IntTy, |
| unsigned | NumWords, | ||
| const uint64_t | Words[] ) |
Obtain a constant value for an integer of arbitrary precision.
Definition at line 1573 of file Core.cpp.
References llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI LLVMValueRef LLVMConstIntOfString | ( | LLVMTypeRef | IntTy, |
| const char * | Text, | ||
| uint8_t | Radix ) |
Obtain a constant value for an integer parsed from a string.
A similar API, LLVMConstIntOfStringAndSize is also available. If the string's length is available, it is preferred to call that function instead.
References const, LLVM_C_ABI, and LLVMConstIntOfString().
Referenced by LLVMConstIntOfString().
| LLVM_C_ABI LLVMValueRef LLVMConstIntOfStringAndSize | ( | LLVMTypeRef | IntTy, |
| const char * | Text, | ||
| unsigned | SLen, | ||
| uint8_t | Radix ) |
Obtain a constant value for an integer parsed from a string with specified length.
References const, LLVM_C_ABI, LLVMConstByte(), LLVMConstByteOfArbitraryPrecision(), LLVMConstIntOfStringAndSize(), and N.
Referenced by LLVMConstIntOfStringAndSize().
| LLVM_C_ABI LLVMValueRef LLVMConstReal | ( | LLVMTypeRef | RealTy, |
| double | N ) |
Obtain a constant value referring to a double floating point value.
Definition at line 1617 of file Core.cpp.
References N, llvm::unwrap(), and llvm::wrap().
Referenced by LLVMConstByteOfStringAndSize().
| LLVM_C_ABI double LLVMConstRealGetDouble | ( | LLVMValueRef | ConstantVal, |
| LLVMBool * | losesInfo ) |
Obtain the double value for an floating point constant value.
losesInfo indicates if some precision was lost in the conversion.
Definition at line 1654 of file Core.cpp.
References llvm::APFloat::convert(), llvm::APFloat::convertToDouble(), llvm::Value::getType(), llvm::ConstantFP::getValueAPF(), llvm::APFloatBase::IEEEdouble(), llvm::APFloatBase::rmNearestTiesToEven, and llvm::unwrap().
Referenced by LLVMConstRealOfStringAndSize().
| LLVM_C_ABI LLVMValueRef LLVMConstRealOfString | ( | LLVMTypeRef | RealTy, |
| const char * | Text ) |
Obtain a constant for a floating point value parsed from a string.
A similar API, LLVMConstRealOfStringAndSize is also available. It should be used if the input string's length is known.
Definition at line 1621 of file Core.cpp.
References llvm::unwrap(), and llvm::wrap().
Referenced by LLVMConstByteOfStringAndSize().
| LLVM_C_ABI LLVMValueRef LLVMConstRealOfStringAndSize | ( | LLVMTypeRef | RealTy, |
| const char * | Text, | ||
| unsigned | SLen ) |
Obtain a constant for a floating point value parsed from a string.
References C(), const, LLVM_C_ABI, LLVMConstByteGetSExtValue(), LLVMConstByteGetZExtValue(), LLVMConstFPFromBits(), LLVMConstIntGetSExtValue(), LLVMConstIntGetZExtValue(), LLVMConstRealGetDouble(), LLVMConstRealOfStringAndSize(), LLVMConstStringInContext(), LLVMConstStringInContext2(), and N.
Referenced by LLVMConstRealOfStringAndSize().