Use LLVMDIBuilderCreateMemberType
This commit is contained in:
parent
2ebb1263e3
commit
923d1be6b6
3 changed files with 16 additions and 27 deletions
|
|
@ -1034,10 +1034,10 @@ fn create_member_type<'ll, 'tcx>(
|
|||
type_di_node: &'ll DIType,
|
||||
) -> &'ll DIType {
|
||||
unsafe {
|
||||
llvm::LLVMRustDIBuilderCreateMemberType(
|
||||
llvm::LLVMDIBuilderCreateMemberType(
|
||||
DIB(cx),
|
||||
owner,
|
||||
name.as_c_char_ptr(),
|
||||
name.as_ptr(),
|
||||
name.len(),
|
||||
file_metadata,
|
||||
line_number,
|
||||
|
|
|
|||
|
|
@ -1943,6 +1943,20 @@ unsafe extern "C" {
|
|||
UniqueId: *const c_uchar, // See "PTR_LEN_STR".
|
||||
UniqueIdLen: size_t,
|
||||
) -> &'ll Metadata;
|
||||
|
||||
pub(crate) fn LLVMDIBuilderCreateMemberType<'ll>(
|
||||
Builder: &DIBuilder<'ll>,
|
||||
Scope: &'ll Metadata,
|
||||
Name: *const c_uchar, // See "PTR_LEN_STR".
|
||||
NameLen: size_t,
|
||||
File: &'ll Metadata,
|
||||
LineNo: c_uint,
|
||||
SizeInBits: u64,
|
||||
AlignInBits: u32,
|
||||
OffsetInBits: u64,
|
||||
Flags: DIFlags,
|
||||
Ty: &'ll Metadata,
|
||||
) -> &'ll Metadata;
|
||||
}
|
||||
|
||||
#[link(name = "llvm-wrapper", kind = "static")]
|
||||
|
|
@ -2288,20 +2302,6 @@ unsafe extern "C" {
|
|||
Scope: Option<&'a DIScope>,
|
||||
) -> &'a DIDerivedType;
|
||||
|
||||
pub(crate) fn LLVMRustDIBuilderCreateMemberType<'a>(
|
||||
Builder: &DIBuilder<'a>,
|
||||
Scope: &'a DIDescriptor,
|
||||
Name: *const c_char,
|
||||
NameLen: size_t,
|
||||
File: &'a DIFile,
|
||||
LineNo: c_uint,
|
||||
SizeInBits: u64,
|
||||
AlignInBits: u32,
|
||||
OffsetInBits: u64,
|
||||
Flags: DIFlags,
|
||||
Ty: &'a DIType,
|
||||
) -> &'a DIDerivedType;
|
||||
|
||||
pub(crate) fn LLVMRustDIBuilderCreateVariantMemberType<'a>(
|
||||
Builder: &DIBuilder<'a>,
|
||||
Scope: &'a DIScope,
|
||||
|
|
|
|||
|
|
@ -1088,17 +1088,6 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateVariantPart(
|
|||
StringRef(UniqueId, UniqueIdLen)));
|
||||
}
|
||||
|
||||
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateMemberType(
|
||||
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
|
||||
size_t NameLen, LLVMMetadataRef File, unsigned LineNo, uint64_t SizeInBits,
|
||||
uint32_t AlignInBits, uint64_t OffsetInBits, LLVMDIFlags Flags,
|
||||
LLVMMetadataRef Ty) {
|
||||
return wrap(unwrap(Builder)->createMemberType(
|
||||
unwrapDI<DIDescriptor>(Scope), StringRef(Name, NameLen),
|
||||
unwrapDI<DIFile>(File), LineNo, SizeInBits, AlignInBits, OffsetInBits,
|
||||
fromRust(Flags), unwrapDI<DIType>(Ty)));
|
||||
}
|
||||
|
||||
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateVariantMemberType(
|
||||
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, const char *Name,
|
||||
size_t NameLen, LLVMMetadataRef File, unsigned LineNo, uint64_t SizeInBits,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue