Use LLVMDIBuilderGetOrCreateArray
This commit is contained in:
parent
b1a9f231fe
commit
a6d261712e
3 changed files with 7 additions and 16 deletions
|
|
@ -28,7 +28,7 @@ pub(crate) fn create_DIArray<'ll>(
|
|||
builder: &DIBuilder<'ll>,
|
||||
arr: &[Option<&'ll DIDescriptor>],
|
||||
) -> &'ll DIArray {
|
||||
unsafe { llvm::LLVMRustDIBuilderGetOrCreateArray(builder, arr.as_ptr(), arr.len() as u32) }
|
||||
unsafe { llvm::LLVMDIBuilderGetOrCreateArray(builder, arr.as_ptr(), arr.len()) }
|
||||
}
|
||||
|
||||
#[inline]
|
||||
|
|
|
|||
|
|
@ -1994,6 +1994,12 @@ unsafe extern "C" {
|
|||
LowerBound: i64,
|
||||
Count: i64,
|
||||
) -> &'ll Metadata;
|
||||
|
||||
pub(crate) fn LLVMDIBuilderGetOrCreateArray<'ll>(
|
||||
Builder: &DIBuilder<'ll>,
|
||||
Data: *const Option<&'ll Metadata>,
|
||||
NumElements: size_t,
|
||||
) -> &'ll Metadata;
|
||||
}
|
||||
|
||||
#[link(name = "llvm-wrapper", kind = "static")]
|
||||
|
|
@ -2375,12 +2381,6 @@ unsafe extern "C" {
|
|||
AlignInBits: u32,
|
||||
) -> &'a DIVariable;
|
||||
|
||||
pub(crate) fn LLVMRustDIBuilderGetOrCreateArray<'a>(
|
||||
Builder: &DIBuilder<'a>,
|
||||
Ptr: *const Option<&'a DIDescriptor>,
|
||||
Count: c_uint,
|
||||
) -> &'a DIArray;
|
||||
|
||||
pub(crate) fn LLVMRustDIBuilderInsertDeclareAtEnd<'a>(
|
||||
Builder: &DIBuilder<'a>,
|
||||
Val: &'a Value,
|
||||
|
|
|
|||
|
|
@ -1142,15 +1142,6 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateVariable(
|
|||
}
|
||||
}
|
||||
|
||||
extern "C" LLVMMetadataRef
|
||||
LLVMRustDIBuilderGetOrCreateArray(LLVMDIBuilderRef Builder,
|
||||
LLVMMetadataRef *Ptr, unsigned Count) {
|
||||
Metadata **DataValue = unwrap(Ptr);
|
||||
return wrap(unwrap(Builder)
|
||||
->getOrCreateArray(ArrayRef<Metadata *>(DataValue, Count))
|
||||
.get());
|
||||
}
|
||||
|
||||
extern "C" void
|
||||
LLVMRustDIBuilderInsertDeclareAtEnd(LLVMDIBuilderRef Builder, LLVMValueRef V,
|
||||
LLVMMetadataRef VarInfo, uint64_t *AddrOps,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue