Skip to content

Commit 0b5f9ac

Browse files
committed
replace deprecated LLVMSetCurrentDebugLocation with LLVMSetCurrentDebugLocation2
1 parent 7c96e40 commit 0b5f9ac

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

compiler/rustc_codegen_llvm/src/debuginfo/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ impl<'ll> DebugInfoBuilderMethods for Builder<'_, 'll, '_> {
209209

210210
fn set_dbg_loc(&mut self, dbg_loc: &'ll DILocation) {
211211
unsafe {
212-
let dbg_loc_as_llval = llvm::LLVMRustMetadataAsValue(self.cx().llcx, dbg_loc);
213-
llvm::LLVMSetCurrentDebugLocation(self.llbuilder, dbg_loc_as_llval);
212+
llvm::LLVMSetCurrentDebugLocation2(self.llbuilder, dbg_loc);
214213
}
215214
}
216215

compiler/rustc_codegen_llvm/src/llvm/ffi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ extern "C" {
12501250
pub fn LLVMDisposeBuilder<'a>(Builder: &'a mut Builder<'a>);
12511251

12521252
// Metadata
1253-
pub fn LLVMSetCurrentDebugLocation<'a>(Builder: &Builder<'a>, L: &'a Value);
1253+
pub fn LLVMSetCurrentDebugLocation2<'a>(Builder: &Builder<'a>, Loc: &'a Metadata);
12541254

12551255
// Terminators
12561256
pub fn LLVMBuildRetVoid<'a>(B: &Builder<'a>) -> &'a Value;

0 commit comments

Comments
 (0)