diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-06-03 10:00:11 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2025-06-03 10:00:11 +0000 |
| commit | 00a88b903d3728517dff8f0044160d18a0322ab4 (patch) | |
| tree | fc9ab2d76aea338bc18d9e886da86b34a311b28c /compiler/rustc_codegen_llvm/src/debuginfo | |
| parent | b17dba45186c454576d0fc8fb93ecc65eb1a763a (diff) | |
| download | rust-00a88b903d3728517dff8f0044160d18a0322ab4.tar.gz rust-00a88b903d3728517dff8f0044160d18a0322ab4.zip | |
Remove get_dbg_loc from DebugInfoBuilderMethods
It is only used within cg_llvm.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/debuginfo')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/debuginfo/mod.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs index c5085927923..5ca2505cec4 100644 --- a/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs +++ b/compiler/rustc_codegen_llvm/src/debuginfo/mod.rs @@ -147,6 +147,12 @@ pub(crate) fn finalize(cx: &CodegenCx<'_, '_>) { } } +impl<'ll> Builder<'_, 'll, '_> { + pub(crate) fn get_dbg_loc(&self) -> Option<&'ll DILocation> { + unsafe { llvm::LLVMGetCurrentDebugLocation2(self.llbuilder) } + } +} + impl<'ll> DebugInfoBuilderMethods for Builder<'_, 'll, '_> { // FIXME(eddyb) find a common convention for all of the debuginfo-related // names (choose between `dbg`, `debug`, `debuginfo`, `debug_info` etc.). @@ -209,10 +215,6 @@ 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) } |
