rustc_codegen_llvm: move DISubprogram creation to a dbg_scope_fn method.

This commit is contained in:
Eduard-Mihai Burtescu 2020-02-10 22:30:51 +02:00
parent 9d57c417fc
commit fa2b381ec8
6 changed files with 52 additions and 36 deletions

View file

@ -21,6 +21,15 @@ pub trait DebugInfoMethods<'tcx>: BackendTypes {
mir: &mir::Body<'_>,
) -> Option<FunctionDebugContext<Self::DIScope>>;
// FIXME(eddyb) find a common convention for all of the debuginfo-related
// names (choose between `dbg`, `debug`, `debuginfo`, `debug_info` etc.).
fn dbg_scope_fn(
&self,
instance: Instance<'tcx>,
fn_abi: &FnAbi<'tcx, Ty<'tcx>>,
maybe_definition_llfn: Option<Self::Function>,
) -> Self::DIScope;
fn extend_scope_to_file(
&self,
scope_metadata: Self::DIScope,