1
Fork 0

rustc_codegen_llvm: avoid converting between DILocation and Value.

This commit is contained in:
Eduard-Mihai Burtescu 2020-02-10 22:52:20 +02:00
parent fa2b381ec8
commit 88d874de63
4 changed files with 16 additions and 13 deletions

View file

@ -192,7 +192,8 @@ impl DebugInfoBuilderMethods for Builder<'a, 'll, 'tcx> {
let dbg_loc = self.cx().create_debug_loc(scope, span);
unsafe {
llvm::LLVMSetCurrentDebugLocation(self.llbuilder, dbg_loc);
let dbg_loc_as_llval = llvm::LLVMRustMetadataAsValue(self.cx().llcx, dbg_loc);
llvm::LLVMSetCurrentDebugLocation(self.llbuilder, dbg_loc_as_llval);
}
}
fn insert_reference_to_gdb_debug_scripts_section_global(&mut self) {