Skip to content

Commit 04f767e

Browse files
authored
Auto merge of #37172 - michaelwoerister:cleanup-dibuilder, r=eddyb
debuginfo: Remove some outdated stuff from LLVM DIBuilder binding. These seem to be leftovers from various adaptations to changes in LLVM over time. Perfect for a rollup. r? @eddyb
2 parents 6dc035e + db4a9b3 commit 04f767e

File tree

3 files changed

+1
-33
lines changed

3 files changed

+1
-33
lines changed

src/librustc_llvm/ffi.rs

-11
Original file line numberDiff line numberDiff line change
@@ -1817,8 +1817,6 @@ extern {
18171817
Ty: DIType,
18181818
AlwaysPreserve: bool,
18191819
Flags: c_uint,
1820-
AddrOps: *const i64,
1821-
AddrOpsCount: c_uint,
18221820
ArgNo: c_uint)
18231821
-> DIVariable;
18241822

@@ -1855,15 +1853,6 @@ extern {
18551853
InsertAtEnd: BasicBlockRef)
18561854
-> ValueRef;
18571855

1858-
pub fn LLVMRustDIBuilderInsertDeclareBefore(Builder: DIBuilderRef,
1859-
Val: ValueRef,
1860-
VarInfo: DIVariable,
1861-
AddrOps: *const i64,
1862-
AddrOpsCount: c_uint,
1863-
DL: ValueRef,
1864-
InsertBefore: ValueRef)
1865-
-> ValueRef;
1866-
18671856
pub fn LLVMRustDIBuilderCreateEnumerator(Builder: DIBuilderRef,
18681857
Name: *const c_char,
18691858
Val: u64)

src/librustc_trans/debuginfo/mod.rs

-2
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,6 @@ pub fn declare_local<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
482482
type_metadata,
483483
cx.sess().opts.optimize != config::OptLevel::No,
484484
0,
485-
address_operations.as_ptr(),
486-
address_operations.len() as c_uint,
487485
argument_index)
488486
};
489487
source_loc::set_debug_location(cx, None,

src/rustllvm/RustWrapper.cpp

+1-20
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,6 @@ extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateVariable(
562562
LLVMRustMetadataRef Ty,
563563
bool AlwaysPreserve,
564564
unsigned Flags,
565-
int64_t* AddrOps,
566-
unsigned AddrOpsCount,
567565
unsigned ArgNo) {
568566
#if LLVM_VERSION_GE(3, 8)
569567
if (Tag == 0x100) { // DW_TAG_auto_variable
@@ -645,23 +643,6 @@ extern "C" LLVMValueRef LLVMRustDIBuilderInsertDeclareAtEnd(
645643
unwrap(InsertAtEnd)));
646644
}
647645

648-
extern "C" LLVMValueRef LLVMRustDIBuilderInsertDeclareBefore(
649-
LLVMRustDIBuilderRef Builder,
650-
LLVMValueRef Val,
651-
LLVMRustMetadataRef VarInfo,
652-
int64_t* AddrOps,
653-
unsigned AddrOpsCount,
654-
LLVMValueRef DL,
655-
LLVMValueRef InsertBefore) {
656-
return wrap(Builder->insertDeclare(
657-
unwrap(Val),
658-
unwrap<DILocalVariable>(VarInfo),
659-
Builder->createExpression(
660-
llvm::ArrayRef<int64_t>(AddrOps, AddrOpsCount)),
661-
DebugLoc(cast<MDNode>(unwrap<MetadataAsValue>(DL)->getMetadata())),
662-
unwrap<Instruction>(InsertBefore)));
663-
}
664-
665646
extern "C" LLVMRustMetadataRef LLVMRustDIBuilderCreateEnumerator(
666647
LLVMRustDIBuilderRef Builder,
667648
const char* Name,
@@ -1302,7 +1283,7 @@ static LLVMLinkage from_rust(LLVMRustLinkage linkage) {
13021283
return LLVMCommonLinkage;
13031284
default:
13041285
llvm_unreachable("Invalid LLVMRustLinkage value!");
1305-
}
1286+
}
13061287
}
13071288

13081289
extern "C" LLVMRustLinkage LLVMRustGetLinkage(LLVMValueRef V) {

0 commit comments

Comments
 (0)