LLVM 20.0.0git
|
Functions in this group operate on composite constants. More...
Functions | |
LLVMValueRef | LLVMConstStringInContext (LLVMContextRef C, const char *Str, unsigned Length, LLVMBool DontNullTerminate) |
Create a ConstantDataSequential and initialize it with a string. | |
LLVMValueRef | LLVMConstStringInContext2 (LLVMContextRef C, const char *Str, size_t Length, LLVMBool DontNullTerminate) |
Create a ConstantDataSequential and initialize it with a string. | |
LLVMValueRef | LLVMConstString (const char *Str, unsigned Length, LLVMBool DontNullTerminate) |
Create a ConstantDataSequential with string content in the global context. | |
LLVMBool | LLVMIsConstantString (LLVMValueRef c) |
Returns true if the specified constant is an array of i8. | |
const char * | LLVMGetAsString (LLVMValueRef c, size_t *Length) |
Get the given constant data sequential as a string. | |
LLVMValueRef | LLVMConstStructInContext (LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed) |
Create an anonymous ConstantStruct with the specified values. | |
LLVMValueRef | LLVMConstStruct (LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed) |
Create a ConstantStruct in the global Context. | |
LLVMValueRef | LLVMConstArray (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length) |
Create a ConstantArray from values. | |
LLVMValueRef | LLVMConstArray2 (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, uint64_t Length) |
Create a ConstantArray from values. | |
LLVMValueRef | LLVMConstNamedStruct (LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count) |
Create a non-anonymous ConstantStruct from values. | |
LLVMValueRef | LLVMGetAggregateElement (LLVMValueRef C, unsigned Idx) |
Get element of a constant aggregate (struct, array or vector) at the specified index. | |
LLVM_ATTRIBUTE_C_DEPRECATED (LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned idx), "Use LLVMGetAggregateElement instead") | |
Get an element at specified index as a constant. | |
LLVMValueRef | LLVMConstVector (LLVMValueRef *ScalarConstantVals, unsigned Size) |
Create a ConstantVector from values. | |
LLVMValueRef | LLVMConstantPtrAuth (LLVMValueRef Ptr, LLVMValueRef Key, LLVMValueRef Disc, LLVMValueRef AddrDisc) |
Create a ConstantPtrAuth constant with the given values. | |
Functions in this group operate on composite constants.
LLVM_ATTRIBUTE_C_DEPRECATED | ( | LLVMValueRef | LLVMGetElementAsConstantLLVMValueRef C, unsigned idx, |
"Use LLVMGetAggregateElement instead" | |||
) |
Get an element at specified index as a constant.
LLVMValueRef LLVMConstantPtrAuth | ( | LLVMValueRef | Ptr, |
LLVMValueRef | Key, | ||
LLVMValueRef | Disc, | ||
LLVMValueRef | AddrDisc | ||
) |
Create a ConstantPtrAuth constant with the given values.
Definition at line 1685 of file Core.cpp.
References llvm::ConstantPtrAuth::get(), Ptr, and llvm::wrap().
LLVMValueRef LLVMConstArray | ( | LLVMTypeRef | ElementTy, |
LLVMValueRef * | ConstantVals, | ||
unsigned | Length | ||
) |
Create a ConstantArray from values.
Definition at line 1645 of file Core.cpp.
References llvm::ConstantArray::get(), llvm::Length, unwrap(), and llvm::wrap().
LLVMValueRef LLVMConstArray2 | ( | LLVMTypeRef | ElementTy, |
LLVMValueRef * | ConstantVals, | ||
uint64_t | Length | ||
) |
Create a ConstantArray from values.
Definition at line 1651 of file Core.cpp.
References llvm::ConstantArray::get(), llvm::Length, unwrap(), and llvm::wrap().
LLVMValueRef LLVMConstNamedStruct | ( | LLVMTypeRef | StructTy, |
LLVMValueRef * | ConstantVals, | ||
unsigned | Count | ||
) |
Create a non-anonymous ConstantStruct from values.
Definition at line 1671 of file Core.cpp.
References llvm::ConstantStruct::get(), and llvm::wrap().
LLVMValueRef LLVMConstString | ( | const char * | Str, |
unsigned | Length, | ||
LLVMBool | DontNullTerminate | ||
) |
Create a ConstantDataSequential with string content in the global context.
This is the same as LLVMConstStringInContext except it operates on the global context.
Definition at line 1621 of file Core.cpp.
References llvm::Length, LLVMConstStringInContext(), and LLVMGetGlobalContext().
LLVMValueRef LLVMConstStringInContext | ( | LLVMContextRef | C, |
const char * | Str, | ||
unsigned | Length, | ||
LLVMBool | DontNullTerminate | ||
) |
Create a ConstantDataSequential and initialize it with a string.
Definition at line 1603 of file Core.cpp.
References llvm::CallingConv::C, llvm::ConstantDataArray::getString(), llvm::Length, unwrap(), and llvm::wrap().
Referenced by LLVMConstString().
LLVMValueRef LLVMConstStringInContext2 | ( | LLVMContextRef | C, |
const char * | Str, | ||
size_t | Length, | ||
LLVMBool | DontNullTerminate | ||
) |
Create a ConstantDataSequential and initialize it with a string.
Definition at line 1612 of file Core.cpp.
References llvm::CallingConv::C, llvm::ConstantDataArray::getString(), llvm::Length, unwrap(), and llvm::wrap().
LLVMValueRef LLVMConstStruct | ( | LLVMValueRef * | ConstantVals, |
unsigned | Count, | ||
LLVMBool | Packed | ||
) |
Create a ConstantStruct in the global Context.
This is the same as LLVMConstStructInContext except it operates on the global Context.
Definition at line 1665 of file Core.cpp.
References LLVMConstStructInContext(), and LLVMGetGlobalContext().
LLVMValueRef LLVMConstStructInContext | ( | LLVMContextRef | C, |
LLVMValueRef * | ConstantVals, | ||
unsigned | Count, | ||
LLVMBool | Packed | ||
) |
Create an anonymous ConstantStruct with the specified values.
Definition at line 1657 of file Core.cpp.
References llvm::CallingConv::C, llvm::ConstantStruct::getAnon(), unwrap(), and llvm::wrap().
Referenced by LLVMConstStruct().
LLVMValueRef LLVMConstVector | ( | LLVMValueRef * | ScalarConstantVals, |
unsigned | Size | ||
) |
Create a ConstantVector from values.
Definition at line 1680 of file Core.cpp.
References llvm::ConstantVector::get(), Size, and llvm::wrap().
LLVMValueRef LLVMGetAggregateElement | ( | LLVMValueRef | C, |
unsigned | Idx | ||
) |
Get element of a constant aggregate (struct, array or vector) at the specified index.
Returns null if the index is out of range, or it's not possible to determine the element (e.g., because the constant is a constant expression.)
Definition at line 1627 of file Core.cpp.
References llvm::CallingConv::C, Idx, and llvm::wrap().
const char * LLVMGetAsString | ( | LLVMValueRef | c, |
size_t * | Length | ||
) |
Get the given constant data sequential as a string.
Definition at line 1639 of file Core.cpp.
References llvm::CallingConv::C, and llvm::Length.
LLVMBool LLVMIsConstantString | ( | LLVMValueRef | c | ) |
Returns true if the specified constant is an array of i8.
Definition at line 1635 of file Core.cpp.
References llvm::CallingConv::C.