@@ -11,7 +11,7 @@ use rustc_middle::ty::print::with_no_trimmed_paths;
11
11
use rustc_monomorphize:: is_call_from_compiler_builtins_to_upstream_monomorphization;
12
12
13
13
use crate :: constant:: ConstantCx ;
14
- use crate :: debuginfo:: FunctionDebugContext ;
14
+ use crate :: debuginfo:: { FunctionDebugContext , TypeDebugContext } ;
15
15
use crate :: prelude:: * ;
16
16
use crate :: pretty_clif:: CommentWriter ;
17
17
@@ -26,6 +26,7 @@ pub(crate) struct CodegenedFunction {
26
26
pub ( crate ) fn codegen_fn < ' tcx > (
27
27
tcx : TyCtxt < ' tcx > ,
28
28
cx : & mut crate :: CodegenCx ,
29
+ type_dbg : & mut TypeDebugContext < ' tcx > ,
29
30
cached_func : Function ,
30
31
module : & mut dyn Module ,
31
32
instance : Instance < ' tcx > ,
@@ -69,8 +70,10 @@ pub(crate) fn codegen_fn<'tcx>(
69
70
let pointer_type = target_config. pointer_type ( ) ;
70
71
let clif_comments = crate :: pretty_clif:: CommentWriter :: new ( tcx, instance) ;
71
72
73
+ let fn_abi = RevealAllLayoutCx ( tcx) . fn_abi_of_instance ( instance, ty:: List :: empty ( ) ) ;
74
+
72
75
let func_debug_cx = if let Some ( debug_context) = & mut cx. debug_context {
73
- Some ( debug_context. define_function ( tcx, instance, & symbol_name, mir. span ) )
76
+ Some ( debug_context. define_function ( tcx, type_dbg , instance, fn_abi , & symbol_name, mir. span ) )
74
77
} else {
75
78
None
76
79
} ;
@@ -87,7 +90,7 @@ pub(crate) fn codegen_fn<'tcx>(
87
90
instance,
88
91
symbol_name,
89
92
mir,
90
- fn_abi : RevealAllLayoutCx ( tcx ) . fn_abi_of_instance ( instance , ty :: List :: empty ( ) ) ,
93
+ fn_abi,
91
94
92
95
bcx,
93
96
block_map,
0 commit comments