Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 9e43aaa

Browse files
committed
Use LLVMDIBuilderCreateLexicalBlock
1 parent e6c4c6c commit 9e43aaa

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
@@ -1640,6 +1640,14 @@ unsafe extern "C" {
16401640
NameLen: size_t,
16411641
ExportSymbols: llvm::Bool,
16421642
) -> &'ll Metadata;
1643+
1644+
pub(crate) fn LLVMDIBuilderCreateLexicalBlock<'ll>(
1645+
Builder: &DIBuilder<'ll>,
1646+
Scope: &'ll Metadata,
1647+
File: &'ll Metadata,
1648+
Line: c_uint,
1649+
Column: c_uint,
1650+
) -> &'ll Metadata;
16431651
}
16441652

16451653
#[link(name = "llvm-wrapper", kind = "static")]
@@ -2065,14 +2073,6 @@ unsafe extern "C" {
20652073
AlignInBits: u32,
20662074
) -> &'a DIDerivedType;
20672075

2068-
pub fn LLVMRustDIBuilderCreateLexicalBlock<'a>(
2069-
Builder: &DIBuilder<'a>,
2070-
Scope: &'a DIScope,
2071-
File: &'a DIFile,
2072-
Line: c_uint,
2073-
Col: c_uint,
2074-
) -> &'a DILexicalBlock;
2075-
20762076
pub fn LLVMRustDIBuilderCreateLexicalBlockFile<'a>(
20772077
Builder: &DIBuilder<'a>,
20782078
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)