@@ -5,7 +5,7 @@ use rustc_codegen_ssa::traits::*;
5
5
6
6
use crate :: common:: CodegenCx ;
7
7
use crate :: llvm;
8
- use crate :: llvm:: debuginfo:: { DIScope , DISubprogram } ;
8
+ use crate :: llvm:: debuginfo:: DIScope ;
9
9
use rustc_middle:: mir:: { Body , SourceScope } ;
10
10
use rustc_session:: config:: DebugInfo ;
11
11
@@ -16,7 +16,7 @@ use rustc_index::vec::Idx;
16
16
pub fn compute_mir_scopes (
17
17
cx : & CodegenCx < ' ll , ' _ > ,
18
18
mir : & Body < ' _ > ,
19
- fn_metadata : & ' ll DISubprogram ,
19
+ fn_dbg_scope : & ' ll DIScope ,
20
20
debug_context : & mut FunctionDebugContext < & ' ll DIScope > ,
21
21
) {
22
22
// Find all the scopes with variables defined in them.
@@ -37,16 +37,16 @@ pub fn compute_mir_scopes(
37
37
// Instantiate all scopes.
38
38
for idx in 0 ..mir. source_scopes . len ( ) {
39
39
let scope = SourceScope :: new ( idx) ;
40
- make_mir_scope ( cx, & mir, fn_metadata , & has_variables, debug_context, scope) ;
40
+ make_mir_scope ( cx, & mir, fn_dbg_scope , & has_variables, debug_context, scope) ;
41
41
}
42
42
}
43
43
44
44
fn make_mir_scope (
45
45
cx : & CodegenCx < ' ll , ' _ > ,
46
46
mir : & Body < ' _ > ,
47
- fn_metadata : & ' ll DISubprogram ,
47
+ fn_dbg_scope : & ' ll DIScope ,
48
48
has_variables : & BitSet < SourceScope > ,
49
- debug_context : & mut FunctionDebugContext < & ' ll DISubprogram > ,
49
+ debug_context : & mut FunctionDebugContext < & ' ll DIScope > ,
50
50
scope : SourceScope ,
51
51
) {
52
52
if debug_context. scopes [ scope] . is_valid ( ) {
@@ -55,13 +55,13 @@ fn make_mir_scope(
55
55
56
56
let scope_data = & mir. source_scopes [ scope] ;
57
57
let parent_scope = if let Some ( parent) = scope_data. parent_scope {
58
- make_mir_scope ( cx, mir, fn_metadata , has_variables, debug_context, parent) ;
58
+ make_mir_scope ( cx, mir, fn_dbg_scope , has_variables, debug_context, parent) ;
59
59
debug_context. scopes [ parent]
60
60
} else {
61
61
// The root is the function itself.
62
62
let loc = cx. lookup_debug_loc ( mir. span . lo ( ) ) ;
63
63
debug_context. scopes [ scope] = DebugScope {
64
- scope_metadata : Some ( fn_metadata ) ,
64
+ scope_metadata : Some ( fn_dbg_scope ) ,
65
65
file_start_pos : loc. file . start_pos ,
66
66
file_end_pos : loc. file . end_pos ,
67
67
} ;
0 commit comments