Skip to content

Commit 8727d80

Browse files
committed
Use LLVMDIBuilderCreateLexicalBlock
1 parent e752e60 commit 8727d80

File tree

3 files changed

+9
-17
lines changed

3 files changed

+9
-17
lines changed

compiler/rustc_codegen_llvm/src/debuginfo/create_scope_map.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ fn make_mir_scope<'ll, 'tcx>(
135135
})
136136
}
137137
None => unsafe {
138-
llvm::LLVMRustDIBuilderCreateLexicalBlock(
138+
llvm::LLVMDIBuilderCreateLexicalBlock(
139139
DIB(cx),
140140
parent_scope.dbg_scope,
141141
file_metadata,

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,6 +1642,14 @@ unsafe extern "C" {
16421642
NameLen: size_t,
16431643
ExportSymbols: llvm::Bool,
16441644
) -> &'ll Metadata;
1645+
1646+
pub(crate) fn LLVMDIBuilderCreateLexicalBlock<'ll>(
1647+
Builder: &DIBuilder<'ll>,
1648+
Scope: &'ll Metadata,
1649+
File: &'ll Metadata,
1650+
Line: c_uint,
1651+
Column: c_uint,
1652+
) -> &'ll Metadata;
16451653
}
16461654

16471655
#[link(name = "llvm-wrapper", kind = "static")]
@@ -2067,14 +2075,6 @@ unsafe extern "C" {
20672075
AlignInBits: u32,
20682076
) -> &'a DIDerivedType;
20692077

2070-
pub fn LLVMRustDIBuilderCreateLexicalBlock<'a>(
2071-
Builder: &DIBuilder<'a>,
2072-
Scope: &'a DIScope,
2073-
File: &'a DIFile,
2074-
Line: c_uint,
2075-
Col: c_uint,
2076-
) -> &'a DILexicalBlock;
2077-
20782078
pub fn LLVMRustDIBuilderCreateLexicalBlockFile<'a>(
20792079
Builder: &DIBuilder<'a>,
20802080
Scope: &'a DIScope,

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,14 +1078,6 @@ extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateStaticMemberType(
10781078
unwrap<llvm::ConstantInt>(val), llvm::dwarf::DW_TAG_member, AlignInBits));
10791079
}
10801080

1081-
extern "C" LLVMMetadataRef
1082-
LLVMRustDIBuilderCreateLexicalBlock(LLVMRustDIBuilderRef Builder,
1083-
LLVMMetadataRef Scope, LLVMMetadataRef File,
1084-
unsigned Line, unsigned Col) {
1085-
return wrap(Builder->createLexicalBlock(unwrapDI<DIDescriptor>(Scope),
1086-
unwrapDI<DIFile>(File), Line, Col));
1087-
}
1088-
10891081
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateLexicalBlockFile(
10901082
LLVMRustDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File) {
10911083
return wrap(Builder->createLexicalBlockFile(unwrapDI<DIDescriptor>(Scope),

0 commit comments

Comments
 (0)