Skip to content

Commit b0b0fa7

Browse files
committed
Use LLVMDIBuilderCreateLexicalBlock
1 parent 02a3d12 commit b0b0fa7

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
@@ -1632,6 +1632,14 @@ unsafe extern "C" {
16321632
NameLen: size_t,
16331633
ExportSymbols: llvm::Bool,
16341634
) -> &'ll Metadata;
1635+
1636+
pub(crate) fn LLVMDIBuilderCreateLexicalBlock<'ll>(
1637+
Builder: &DIBuilder<'ll>,
1638+
Scope: &'ll Metadata,
1639+
File: &'ll Metadata,
1640+
Line: c_uint,
1641+
Column: c_uint,
1642+
) -> &'ll Metadata;
16351643
}
16361644

16371645
#[link(name = "llvm-wrapper", kind = "static")]
@@ -2057,14 +2065,6 @@ unsafe extern "C" {
20572065
AlignInBits: u32,
20582066
) -> &'a DIDerivedType;
20592067

2060-
pub fn LLVMRustDIBuilderCreateLexicalBlock<'a>(
2061-
Builder: &DIBuilder<'a>,
2062-
Scope: &'a DIScope,
2063-
File: &'a DIFile,
2064-
Line: c_uint,
2065-
Col: c_uint,
2066-
) -> &'a DILexicalBlock;
2067-
20682068
pub fn LLVMRustDIBuilderCreateLexicalBlockFile<'a>(
20692069
Builder: &DIBuilder<'a>,
20702070
Scope: &'a DIScope,

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

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

1158-
extern "C" LLVMMetadataRef
1159-
LLVMRustDIBuilderCreateLexicalBlock(LLVMRustDIBuilderRef Builder,
1160-
LLVMMetadataRef Scope, LLVMMetadataRef File,
1161-
unsigned Line, unsigned Col) {
1162-
return wrap(Builder->createLexicalBlock(unwrapDI<DIDescriptor>(Scope),
1163-
unwrapDI<DIFile>(File), Line, Col));
1164-
}
1165-
11661158
extern "C" LLVMMetadataRef LLVMRustDIBuilderCreateLexicalBlockFile(
11671159
LLVMRustDIBuilderRef Builder, LLVMMetadataRef Scope, LLVMMetadataRef File) {
11681160
return wrap(Builder->createLexicalBlockFile(unwrapDI<DIDescriptor>(Scope),

0 commit comments

Comments
 (0)