@@ -21,7 +21,7 @@ use rustc_codegen_ssa::debuginfo::type_names;
2121use rustc_codegen_ssa:: mir:: debuginfo:: { DebugScope , FunctionDebugContext , VariableKind } ;
2222use rustc_codegen_ssa:: traits:: * ;
2323use rustc_data_structures:: fx:: { FxHashMap , FxHashSet } ;
24- use rustc_hir:: def_id:: { CrateNum , DefId , DefIdMap , LOCAL_CRATE } ;
24+ use rustc_hir:: def_id:: { DefId , DefIdMap , LOCAL_CRATE } ;
2525use rustc_index:: vec:: IndexVec ;
2626use rustc_middle:: mir;
2727use rustc_middle:: ty:: layout:: HasTyCtxt ;
@@ -246,7 +246,7 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
246246 let def_id = instance. def_id ( ) ;
247247 let containing_scope = get_containing_scope ( self , instance) ;
248248 let loc = self . lookup_debug_loc ( span. lo ( ) ) ;
249- let file_metadata = file_metadata ( self , & loc. file , def_id . krate ) ;
249+ let file_metadata = file_metadata ( self , & loc. file ) ;
250250
251251 let function_type_metadata = unsafe {
252252 let fn_signature = get_function_signature ( self , fn_abi) ;
@@ -318,10 +318,8 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
318318 file_start_pos : BytePos ( 0 ) ,
319319 file_end_pos : BytePos ( 0 ) ,
320320 } ;
321- let mut fn_debug_context = FunctionDebugContext {
322- scopes : IndexVec :: from_elem ( null_scope, & mir. source_scopes ) ,
323- defining_crate : def_id. krate ,
324- } ;
321+ let mut fn_debug_context =
322+ FunctionDebugContext { scopes : IndexVec :: from_elem ( null_scope, & mir. source_scopes ) } ;
325323
326324 // Fill in all the scopes, with the information from the MIR body.
327325 compute_mir_scopes ( self , mir, fn_metadata, & mut fn_debug_context) ;
@@ -509,9 +507,8 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
509507 & self ,
510508 scope_metadata : & ' ll DIScope ,
511509 file : & rustc_span:: SourceFile ,
512- defining_crate : CrateNum ,
513510 ) -> & ' ll DILexicalBlock {
514- metadata:: extend_scope_to_file ( & self , scope_metadata, file, defining_crate )
511+ metadata:: extend_scope_to_file ( & self , scope_metadata, file)
515512 }
516513
517514 fn debuginfo_finalize ( & self ) {
@@ -522,15 +519,14 @@ impl DebugInfoMethods<'tcx> for CodegenCx<'ll, 'tcx> {
522519 // names (choose between `dbg`, `debug`, `debuginfo`, `debug_info` etc.).
523520 fn create_dbg_var (
524521 & self ,
525- dbg_context : & FunctionDebugContext < & ' ll DIScope > ,
526522 variable_name : Symbol ,
527523 variable_type : Ty < ' tcx > ,
528524 scope_metadata : & ' ll DIScope ,
529525 variable_kind : VariableKind ,
530526 span : Span ,
531527 ) -> & ' ll DIVariable {
532528 let loc = self . lookup_debug_loc ( span. lo ( ) ) ;
533- let file_metadata = file_metadata ( self , & loc. file , dbg_context . defining_crate ) ;
529+ let file_metadata = file_metadata ( self , & loc. file ) ;
534530
535531 let type_metadata = type_metadata ( self , variable_type, span) ;
536532
0 commit comments