@@ -170,14 +170,15 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
170170) {
171171 assert ! ( !instance. args. has_infer( ) ) ;
172172
173+ let tcx = cx. tcx ( ) ;
173174 let llfn = cx. get_fn ( instance) ;
174175
175176 let mir = cx. tcx ( ) . instance_mir ( instance. def ) ;
176177
177178 let fn_abi = cx. fn_abi_of_instance ( instance, ty:: List :: empty ( ) ) ;
178179 debug ! ( "fn_abi: {:?}" , fn_abi) ;
179180
180- if cx . tcx ( ) . codegen_fn_attrs ( instance. def_id ( ) ) . flags . contains ( CodegenFnAttrFlags :: NAKED ) {
181+ if tcx. codegen_fn_attrs ( instance. def_id ( ) ) . flags . contains ( CodegenFnAttrFlags :: NAKED ) {
181182 crate :: mir:: naked_asm:: codegen_naked_asm :: < Bx > ( cx, & mir, instance) ;
182183 return ;
183184 }
@@ -194,7 +195,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
194195 }
195196
196197 let cleanup_kinds =
197- base:: wants_new_eh_instructions ( cx . tcx ( ) . sess ) . then ( || analyze:: cleanup_kinds ( mir) ) ;
198+ base:: wants_new_eh_instructions ( tcx. sess ) . then ( || analyze:: cleanup_kinds ( mir) ) ;
198199
199200 let cached_llbbs: IndexVec < mir:: BasicBlock , CachedLlbb < Bx :: BasicBlock > > =
200201 mir. basic_blocks
@@ -217,7 +218,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
217218 cleanup_kinds,
218219 landing_pads : IndexVec :: from_elem ( None , & mir. basic_blocks ) ,
219220 funclets : IndexVec :: from_fn_n ( |_| None , mir. basic_blocks . len ( ) ) ,
220- cold_blocks : find_cold_blocks ( cx . tcx ( ) , mir) ,
221+ cold_blocks : find_cold_blocks ( tcx, mir) ,
221222 locals : locals:: Locals :: empty ( ) ,
222223 debug_context,
223224 per_local_var_debug_info : None ,
@@ -233,7 +234,7 @@ pub fn codegen_mir<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
233234 fx. compute_per_local_var_debug_info ( & mut start_bx) . unzip ( ) ;
234235 fx. per_local_var_debug_info = per_local_var_debug_info;
235236
236- let traversal_order = traversal:: mono_reachable_reverse_postorder ( mir, cx . tcx ( ) , instance) ;
237+ let traversal_order = traversal:: mono_reachable_reverse_postorder ( mir, tcx, instance) ;
237238 let memory_locals = analyze:: non_ssa_locals ( & fx, & traversal_order) ;
238239
239240 // Allocate variable and temp allocas
0 commit comments