about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/debuginfo
diff options
context:
space:
mode:
authorBastian Kersting <bkersting@google.com>2024-11-08 08:51:19 +0000
committerBastian Kersting <bkersting@google.com>2024-11-11 09:17:43 +0000
commitc2102259a04dd9ede1e7faf01daa0dfcb948c214 (patch)
treeb46670046aafb94476c925e77f7a09c758caa17f /compiler/rustc_codegen_llvm/src/debuginfo
parent4d215e2426d52ca8d1af166d5f6b5e172afbff67 (diff)
downloadrust-c2102259a04dd9ede1e7faf01daa0dfcb948c214.tar.gz
rust-c2102259a04dd9ede1e7faf01daa0dfcb948c214.zip
CFI: Append debug location to CFI blocks
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo')
-rw-r--r--compiler/rustc_codegen_llvm/src/debuginfo/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
index 9e1e5127e80..89492e4b9fe 100644
--- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
+++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs
@@ -206,6 +206,10 @@ impl<'ll> DebugInfoBuilderMethods for Builder<'_, 'll, '_> {
         }
     }
 
+    fn get_dbg_loc(&self) -> Option<&'ll DILocation> {
+        unsafe { llvm::LLVMGetCurrentDebugLocation2(self.llbuilder) }
+    }
+
     fn insert_reference_to_gdb_debug_scripts_section_global(&mut self) {
         gdb::insert_reference_to_gdb_debug_scripts_section_global(self)
     }