Fix 32-bit overflows in LLVM composite constants
This commit is contained in:
@@ -936,10 +936,16 @@ extern "C" {
|
||||
pub fn LLVMConstReal(RealTy: &Type, N: f64) -> &Value;
|
||||
|
||||
// Operations on composite constants
|
||||
pub fn LLVMConstStringInContext(
|
||||
pub fn LLVMConstArray2<'a>(
|
||||
ElementTy: &'a Type,
|
||||
ConstantVals: *const &'a Value,
|
||||
Length: u64,
|
||||
) -> &'a Value;
|
||||
pub fn LLVMArrayType2(ElementType: &Type, ElementCount: u64) -> &Type;
|
||||
pub fn LLVMConstStringInContext2(
|
||||
C: &Context,
|
||||
Str: *const c_char,
|
||||
Length: c_uint,
|
||||
Length: size_t,
|
||||
DontNullTerminate: Bool,
|
||||
) -> &Value;
|
||||
pub fn LLVMConstStructInContext<'a>(
|
||||
@@ -948,14 +954,6 @@ extern "C" {
|
||||
Count: c_uint,
|
||||
Packed: Bool,
|
||||
) -> &'a Value;
|
||||
|
||||
// FIXME: replace with LLVMConstArray2 when bumped minimal version to llvm-17
|
||||
// https://github.com/llvm/llvm-project/commit/35276f16e5a2cae0dfb49c0fbf874d4d2f177acc
|
||||
pub fn LLVMConstArray<'a>(
|
||||
ElementTy: &'a Type,
|
||||
ConstantVals: *const &'a Value,
|
||||
Length: c_uint,
|
||||
) -> &'a Value;
|
||||
pub fn LLVMConstVector(ScalarConstantVals: *const &Value, Size: c_uint) -> &Value;
|
||||
|
||||
// Constant expressions
|
||||
@@ -1530,9 +1528,6 @@ extern "C" {
|
||||
/// See llvm::LLVMTypeKind::getTypeID.
|
||||
pub fn LLVMRustGetTypeKind(Ty: &Type) -> TypeKind;
|
||||
|
||||
// Operations on array, pointer, and vector types (sequence types)
|
||||
pub fn LLVMRustArrayType(ElementType: &Type, ElementCount: u64) -> &Type;
|
||||
|
||||
// Operations on all values
|
||||
pub fn LLVMRustGlobalAddMetadata<'a>(Val: &'a Value, KindID: c_uint, Metadata: &'a Metadata);
|
||||
pub fn LLVMRustIsNonGVFunctionPointerTy(Val: &Value) -> bool;
|
||||
|
||||
Reference in New Issue
Block a user