Skip to content

Commit 70d41bc

Browse files
committed
Use LLVMDIBuilderCreateLexicalBlock
1 parent 878ab12 commit 70d41bc

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
@@ -127,7 +127,7 @@ fn make_mir_scope<'ll, 'tcx>(
127127
})
128128
}
129129
None => unsafe {
130-
llvm::LLVMRustDIBuilderCreateLexicalBlock(
130+
llvm::LLVMDIBuilderCreateLexicalBlock(
131131
DIB(cx),
132132
parent_scope.dbg_scope,
133133
file_metadata,

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,6 +1726,14 @@ unsafe extern "C" {
17261726
NameLen: size_t,
17271727
ExportSymbols: llvm::Bool,
17281728
) -> &'ll Metadata;
1729+
1730+
pub(crate) fn LLVMDIBuilderCreateLexicalBlock<'ll>(
1731+
Builder: &DIBuilder<'ll>,
1732+
Scope: &'ll Metadata,
1733+
File: &'ll Metadata,
1734+
Line: c_uint,
1735+
Column: c_uint,
1736+
) -> &'ll Metadata;
17291737
}
17301738

17311739
#[link(name = "llvm-wrapper", kind = "static")]
@@ -2157,14 +2165,6 @@ unsafe extern "C" {
21572165
Type: &'a DIType,
21582166
) -> &'a DIDerivedType;
21592167

2160-
pub fn LLVMRustDIBuilderCreateLexicalBlock<'a>(
2161-
Builder: &DIBuilder<'a>,
2162-
Scope: &'a DIScope,
2163-
File: &'a DIFile,
2164-
Line: c_uint,
2165-
Col: c_uint,
2166-
) -> &'a DILexicalBlock;
2167-
21682168
pub fn LLVMRustDIBuilderCreateLexicalBlockFile<'a>(
21692169
Builder: &DIBuilder<'a>,
21702170
Scope: &'a DIScope,

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,14 +1179,6 @@ LLVMRustDIBuilderCreateQualifiedType(LLVMDIBuilderRef Builder, unsigned Tag,
11791179
unwrap(Builder)->createQualifiedType(Tag, unwrapDI<DIType>(Type)));
11801180
}
11811181

1182-
extern "C" LLVMMetadataRef
1183-
LLVMRustDIBuilderCreateLexicalBlock(LLVMDIBuilderRef Builder,
1184-
LLVMMetadataRef Scope, LLVMMetadataRef File,
1185-
unsigned Line, unsigned Col) {
1186-
return wrap(unwrap(Builder)->createLexicalBlock(
1187-
unwrapDI<DIDescriptor>(Scope), unwrapDI<DIFile>(File), Line, Col));
1188-
}
1189-
11901182
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateLexicalBlockFile(
11911183
LLVMDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File) {
11921184
return wrap(unwrap(Builder)->createLexicalBlockFile(

0 commit comments

Comments
 (0)