@@ -4,16 +4,25 @@ use rustc_codegen_ssa::traits::{DebugInfoBuilderMethods, DebugInfoMethods};
4
4
use rustc_middle:: mir;
5
5
use rustc_middle:: ty:: { Instance , PolyExistentialTraitRef , Ty } ;
6
6
use rustc_span:: { SourceFile , Span , Symbol } ;
7
- use rustc_target:: abi:: Size ;
8
7
use rustc_target:: abi:: call:: FnAbi ;
8
+ use rustc_target:: abi:: Size ;
9
+ use std:: ops:: Range ;
9
10
10
11
use crate :: builder:: Builder ;
11
12
use crate :: context:: CodegenCx ;
12
13
13
14
impl < ' a , ' gcc , ' tcx > DebugInfoBuilderMethods for Builder < ' a , ' gcc , ' tcx > {
14
15
// FIXME(eddyb) find a common convention for all of the debuginfo-related
15
16
// names (choose between `dbg`, `debug`, `debuginfo`, `debug_info` etc.).
16
- fn dbg_var_addr ( & mut self , _dbg_var : Self :: DIVariable , _scope_metadata : Self :: DIScope , _variable_alloca : Self :: Value , _direct_offset : Size , _indirect_offsets : & [ Size ] ) {
17
+ fn dbg_var_addr (
18
+ & mut self ,
19
+ _dbg_var : Self :: DIVariable ,
20
+ _scope_metadata : Self :: DIScope ,
21
+ _variable_alloca : Self :: Value ,
22
+ _direct_offset : Size ,
23
+ _indirect_offsets : & [ Size ] ,
24
+ _fragment : Option < Range < Size > > ,
25
+ ) {
17
26
unimplemented ! ( ) ;
18
27
}
19
28
@@ -31,32 +40,64 @@ impl<'a, 'gcc, 'tcx> DebugInfoBuilderMethods for Builder<'a, 'gcc, 'tcx> {
31
40
}
32
41
33
42
impl < ' gcc , ' tcx > DebugInfoMethods < ' tcx > for CodegenCx < ' gcc , ' tcx > {
34
- fn create_vtable_debuginfo ( & self , _ty : Ty < ' tcx > , _trait_ref : Option < PolyExistentialTraitRef < ' tcx > > , _vtable : Self :: Value ) {
43
+ fn create_vtable_debuginfo (
44
+ & self ,
45
+ _ty : Ty < ' tcx > ,
46
+ _trait_ref : Option < PolyExistentialTraitRef < ' tcx > > ,
47
+ _vtable : Self :: Value ,
48
+ ) {
35
49
// TODO(antoyo)
36
50
}
37
51
38
- fn create_function_debug_context ( & self , _instance : Instance < ' tcx > , _fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > , _llfn : RValue < ' gcc > , _mir : & mir:: Body < ' tcx > ) -> Option < FunctionDebugContext < Self :: DIScope , Self :: DILocation > > {
52
+ fn create_function_debug_context (
53
+ & self ,
54
+ _instance : Instance < ' tcx > ,
55
+ _fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
56
+ _llfn : RValue < ' gcc > ,
57
+ _mir : & mir:: Body < ' tcx > ,
58
+ ) -> Option < FunctionDebugContext < Self :: DIScope , Self :: DILocation > > {
39
59
// TODO(antoyo)
40
60
None
41
61
}
42
62
43
- fn extend_scope_to_file ( & self , _scope_metadata : Self :: DIScope , _file : & SourceFile ) -> Self :: DIScope {
63
+ fn extend_scope_to_file (
64
+ & self ,
65
+ _scope_metadata : Self :: DIScope ,
66
+ _file : & SourceFile ,
67
+ ) -> Self :: DIScope {
44
68
unimplemented ! ( ) ;
45
69
}
46
70
47
71
fn debuginfo_finalize ( & self ) {
48
72
// TODO(antoyo)
49
73
}
50
74
51
- fn create_dbg_var ( & self , _variable_name : Symbol , _variable_type : Ty < ' tcx > , _scope_metadata : Self :: DIScope , _variable_kind : VariableKind , _span : Span ) -> Self :: DIVariable {
75
+ fn create_dbg_var (
76
+ & self ,
77
+ _variable_name : Symbol ,
78
+ _variable_type : Ty < ' tcx > ,
79
+ _scope_metadata : Self :: DIScope ,
80
+ _variable_kind : VariableKind ,
81
+ _span : Span ,
82
+ ) -> Self :: DIVariable {
52
83
unimplemented ! ( ) ;
53
84
}
54
85
55
- fn dbg_scope_fn ( & self , _instance : Instance < ' tcx > , _fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > , _maybe_definition_llfn : Option < RValue < ' gcc > > ) -> Self :: DIScope {
86
+ fn dbg_scope_fn (
87
+ & self ,
88
+ _instance : Instance < ' tcx > ,
89
+ _fn_abi : & FnAbi < ' tcx , Ty < ' tcx > > ,
90
+ _maybe_definition_llfn : Option < RValue < ' gcc > > ,
91
+ ) -> Self :: DIScope {
56
92
unimplemented ! ( ) ;
57
93
}
58
94
59
- fn dbg_loc ( & self , _scope : Self :: DIScope , _inlined_at : Option < Self :: DILocation > , _span : Span ) -> Self :: DILocation {
95
+ fn dbg_loc (
96
+ & self ,
97
+ _scope : Self :: DIScope ,
98
+ _inlined_at : Option < Self :: DILocation > ,
99
+ _span : Span ,
100
+ ) -> Self :: DILocation {
60
101
unimplemented ! ( ) ;
61
102
}
62
103
}
0 commit comments