Remove get_dbg_loc from DebugInfoBuilderMethods
It is only used within cg_llvm.
This commit is contained in:
parent
b17dba4518
commit
00a88b903d
3 changed files with 6 additions and 9 deletions
|
|
@ -52,10 +52,6 @@ impl<'a, 'gcc, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'gcc, 'tcx> {
|
|||
fn clear_dbg_loc(&mut self) {
|
||||
self.location = None;
|
||||
}
|
||||
|
||||
fn get_dbg_loc(&self) -> Option<Self::DILocation> {
|
||||
self.location
|
||||
}
|
||||
}
|
||||
|
||||
/// Generate the `debug_context` in an MIR Body.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,6 @@ pub trait DebugInfoBuilderMethods: BackendTypes {
|
|||
);
|
||||
fn set_dbg_loc(&mut self, dbg_loc: Self::DILocation);
|
||||
fn clear_dbg_loc(&mut self);
|
||||
fn get_dbg_loc(&self) -> Option<Self::DILocation>;
|
||||
fn insert_reference_to_gdb_debug_scripts_section_global(&mut self);
|
||||
fn set_var_name(&mut self, value: Self::Value, name: &str);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue