Skip to content

Commit 4944003

Browse files
committed
Use LLVMDIBuilderCreateLexicalBlock
1 parent bd9aa07 commit 4944003

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
@@ -1638,6 +1638,14 @@ unsafe extern "C" {
16381638
NameLen: size_t,
16391639
ExportSymbols: llvm::Bool,
16401640
) -> &'ll Metadata;
1641+
1642+
pub(crate) fn LLVMDIBuilderCreateLexicalBlock<'ll>(
1643+
Builder: &DIBuilder<'ll>,
1644+
Scope: &'ll Metadata,
1645+
File: &'ll Metadata,
1646+
Line: c_uint,
1647+
Column: c_uint,
1648+
) -> &'ll Metadata;
16411649
}
16421650

16431651
#[link(name = "llvm-wrapper", kind = "static")]
@@ -2063,14 +2071,6 @@ unsafe extern "C" {
20632071
AlignInBits: u32,
20642072
) -> &'a DIDerivedType;
20652073

2066-
pub fn LLVMRustDIBuilderCreateLexicalBlock<'a>(
2067-
Builder: &DIBuilder<'a>,
2068-
Scope: &'a DIScope,
2069-
File: &'a DIFile,
2070-
Line: c_uint,
2071-
Col: c_uint,
2072-
) -> &'a DILexicalBlock;
2073-
20742074
pub fn LLVMRustDIBuilderCreateLexicalBlockFile<'a>(
20752075
Builder: &DIBuilder<'a>,
20762076
Scope: &'a DIScope,

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

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

1068-
extern "C" LLVMMetadataRef
1069-
LLVMRustDIBuilderCreateLexicalBlock(LLVMRustDIBuilderRef Builder,
1070-
LLVMMetadataRef Scope, LLVMMetadataRef File,
1071-
unsigned Line, unsigned Col) {
1072-
return wrap(Builder->createLexicalBlock(unwrapDI<DIDescriptor>(Scope),
1073-
unwrapDI<DIFile>(File), Line, Col));
1074-
}
1075-
10761068
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateLexicalBlockFile(
10771069
LLVMRustDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File) {
10781070
return wrap(Builder->createLexicalBlockFile(unwrapDI<DIDescriptor>(Scope),

0 commit comments

Comments
 (0)