|
LLVM 23.0.0git
|
Functions in this group operate on composite constants. More...
Functions | |
| LLVM_C_ABI LLVMValueRef | LLVMConstStringInContext (LLVMContextRef C, const char *Str, unsigned Length, LLVMBool DontNullTerminate) |
| Create a ConstantDataSequential and initialize it with a string. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstStringInContext2 (LLVMContextRef C, const char *Str, size_t Length, LLVMBool DontNullTerminate) |
| Create a ConstantDataSequential and initialize it with a string. | |
| LLVM_C_ABI | LLVM_ATTRIBUTE_C_DEPRECATED (LLVMValueRef LLVMConstString(const char *Str, unsigned Length, LLVMBool DontNullTerminate), "Use of the global context is deprecated, use LLVMConstStringInContext2 " "instead") |
| Create a ConstantDataSequential with string content in the global context. | |
| LLVM_C_ABI LLVMBool | LLVMIsConstantString (LLVMValueRef c) |
| Returns true if the specified constant is an array of i8. | |
| LLVM_C_ABI const char * | LLVMGetAsString (LLVMValueRef c, size_t *Length) |
| Get the given constant data sequential as a string. | |
| LLVM_C_ABI const char * | LLVMGetRawDataValues (LLVMValueRef c, size_t *SizeInBytes) |
| Get the raw, underlying bytes of the given constant data sequential. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstStructInContext (LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed) |
| Create an anonymous ConstantStruct with the specified values. | |
| LLVM_C_ABI | LLVM_ATTRIBUTE_C_DEPRECATED (LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed), "Use of the global context is deprecated, use LLVMConstStructInContext " "instead") |
| Create a ConstantStruct in the global Context. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstArray (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length) |
| Create a ConstantArray from values. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstArray2 (LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, uint64_t Length) |
| Create a ConstantArray from values. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstDataArray (LLVMTypeRef ElementTy, const char *Data, size_t SizeInBytes) |
| Create a ConstantDataArray from raw values. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstNamedStruct (LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count) |
| Create a non-anonymous ConstantStruct from values. | |
| LLVM_C_ABI LLVMValueRef | LLVMGetAggregateElement (LLVMValueRef C, unsigned Idx) |
| Get element of a constant aggregate (struct, array or vector) at the specified index. | |
| LLVM_C_ABI | LLVM_ATTRIBUTE_C_DEPRECATED (LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned idx), "Use LLVMGetAggregateElement instead") |
| Get an element at specified index as a constant. | |
| LLVM_C_ABI LLVMValueRef | LLVMConstVector (LLVMValueRef *ScalarConstantVals, unsigned Size) |
| Create a ConstantVector from values. | |
| LLVM_C_ABI 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_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED | ( | LLVMValueRef | LLVMConstStringconst char *Str, unsigned Length, LLVMBool DontNullTerminate, |
| "Use of the global context is | deprecated, | ||
| use LLVMConstStringInContext2 " "instead" | ) |
Create a ConstantDataSequential with string content in the global context.
This is the same as LLVMConstStringInContext except it operates on the global context.
References C(), const, LLVM_ATTRIBUTE_C_DEPRECATED, LLVM_C_ABI, LLVMConstString(), LLVMConstStructInContext(), LLVMGetAsString(), LLVMGetRawDataValues(), and LLVMIsConstantString().
| LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED | ( | LLVMValueRef | LLVMConstStructLLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed, |
| "Use of the global context is | deprecated, | ||
| use LLVMConstStructInContext " "instead" | ) |
Create a ConstantStruct in the global Context.
This is the same as LLVMConstStructInContext except it operates on the global Context.
References C(), const, LLVM_ATTRIBUTE_C_DEPRECATED, LLVM_C_ABI, LLVMConstArray(), LLVMConstArray2(), LLVMConstDataArray(), LLVMConstNamedStruct(), LLVMConstStruct(), and LLVMGetAggregateElement().
| LLVM_C_ABI LLVM_ATTRIBUTE_C_DEPRECATED | ( | LLVMValueRef | LLVMGetElementAsConstantLLVMValueRef C, unsigned idx, |
| "Use LLVMGetAggregateElement instead" | ) |
Get an element at specified index as a constant.
References C(), LLVM_ATTRIBUTE_C_DEPRECATED, LLVM_C_ABI, LLVMAlignOf(), LLVMConstantPtrAuth(), LLVMConstNeg(), LLVMConstNSWNeg(), LLVMConstVector(), LLVMGetConstOpcode(), LLVMGetElementAsConstant(), LLVMSizeOf(), and Size.
| LLVM_C_ABI LLVMValueRef LLVMConstantPtrAuth | ( | LLVMValueRef | Ptr, |
| LLVMValueRef | Key, | ||
| LLVMValueRef | Disc, | ||
| LLVMValueRef | AddrDisc ) |
Create a ConstantPtrAuth constant with the given values.
Definition at line 1768 of file Core.cpp.
References llvm::cast(), llvm::ConstantPointerNull::get(), llvm::ConstantPtrAuth::get(), getType(), llvm::InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key, llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI LLVMValueRef LLVMConstArray | ( | LLVMTypeRef | ElementTy, |
| LLVMValueRef * | ConstantVals, | ||
| unsigned | Length ) |
Create a ConstantArray from values.
Definition at line 1721 of file Core.cpp.
References llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::Length, llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI LLVMValueRef LLVMConstArray2 | ( | LLVMTypeRef | ElementTy, |
| LLVMValueRef * | ConstantVals, | ||
| uint64_t | Length ) |
Create a ConstantArray from values.
Definition at line 1727 of file Core.cpp.
References llvm::ArrayType::get(), llvm::ConstantArray::get(), llvm::Length, llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI LLVMValueRef LLVMConstDataArray | ( | LLVMTypeRef | ElementTy, |
| const char * | Data, | ||
| size_t | SizeInBytes ) |
Create a ConstantDataArray from raw values.
ElementTy must be one of i8, i16, i32, i64, half, bfloat, float, or double. Data points to a contiguous buffer of raw values in the host endianness. The element count is inferred from the element type and the data size in bytes.
Definition at line 1733 of file Core.cpp.
References llvm::Data, llvm::ConstantDataArray::getRaw(), llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI LLVMValueRef LLVMConstNamedStruct | ( | LLVMTypeRef | StructTy, |
| LLVMValueRef * | ConstantVals, | ||
| unsigned | Count ) |
Create a non-anonymous ConstantStruct from values.
Definition at line 1754 of file Core.cpp.
References llvm::ArrayRef(), llvm::Count, llvm::ConstantStruct::get(), llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI LLVMValueRef LLVMConstStringInContext | ( | LLVMContextRef | C, |
| const char * | Str, | ||
| unsigned | Length, | ||
| LLVMBool | DontNullTerminate ) |
Create a ConstantDataSequential and initialize it with a string.
Definition at line 1673 of file Core.cpp.
References llvm::CallingConv::C, llvm::ConstantDataArray::getString(), llvm::Length, llvm::unwrap(), and llvm::wrap().
Referenced by LLVMConstRealOfStringAndSize(), and LLVMConstString().
| LLVM_C_ABI LLVMValueRef LLVMConstStringInContext2 | ( | LLVMContextRef | C, |
| const char * | Str, | ||
| size_t | Length, | ||
| LLVMBool | DontNullTerminate ) |
Create a ConstantDataSequential and initialize it with a string.
Definition at line 1682 of file Core.cpp.
References llvm::CallingConv::C, llvm::ConstantDataArray::getString(), llvm::Length, llvm::unwrap(), and llvm::wrap().
Referenced by LLVMConstRealOfStringAndSize().
| LLVM_C_ABI LLVMValueRef LLVMConstStructInContext | ( | LLVMContextRef | C, |
| LLVMValueRef * | ConstantVals, | ||
| unsigned | Count, | ||
| LLVMBool | Packed ) |
Create an anonymous ConstantStruct with the specified values.
Definition at line 1740 of file Core.cpp.
References llvm::ArrayRef(), llvm::CallingConv::C, llvm::Count, llvm::ConstantStruct::getAnon(), llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED(), and LLVMConstStruct().
| LLVM_C_ABI LLVMValueRef LLVMConstVector | ( | LLVMValueRef * | ScalarConstantVals, |
| unsigned | Size ) |
Create a ConstantVector from values.
Definition at line 1763 of file Core.cpp.
References llvm::ArrayRef(), llvm::ConstantVector::get(), Size, llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI 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 1697 of file Core.cpp.
References llvm::CallingConv::C, llvm::unwrap(), and llvm::wrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI const char * LLVMGetAsString | ( | LLVMValueRef | c, |
| size_t * | Length ) |
Get the given constant data sequential as a string.
Definition at line 1709 of file Core.cpp.
References llvm::CallingConv::C, llvm::Attribute::getAsString(), llvm::Length, and llvm::unwrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI const char * LLVMGetRawDataValues | ( | LLVMValueRef | c, |
| size_t * | SizeInBytes ) |
Get the raw, underlying bytes of the given constant data sequential.
This is the same as LLVMGetAsString except it works for all constant data sequentials, not just i8 arrays.
Definition at line 1715 of file Core.cpp.
References llvm::CallingConv::C, and llvm::unwrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().
| LLVM_C_ABI LLVMBool LLVMIsConstantString | ( | LLVMValueRef | c | ) |
Returns true if the specified constant is an array of i8.
Definition at line 1705 of file Core.cpp.
References llvm::CallingConv::C, and llvm::unwrap().
Referenced by LLVM_ATTRIBUTE_C_DEPRECATED().