File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
rustc_codegen_cranelift/src/abi
rustc_codegen_ssa/src/mir Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -467,7 +467,7 @@ pub(crate) fn codegen_terminator_call<'tcx>(
467
467
true
468
468
} else {
469
469
instance. is_some_and ( |inst| {
470
- fx. tcx . codegen_fn_attrs ( inst. def_id ( ) ) . flags . contains ( CodegenFnAttrFlags :: COLD )
470
+ fx. tcx . codegen_instance_attrs ( inst. def ) . flags . contains ( CodegenFnAttrFlags :: COLD )
471
471
} )
472
472
} ;
473
473
if is_cold {
Original file line number Diff line number Diff line change @@ -200,7 +200,7 @@ impl<'a, 'tcx> TerminatorCodegenHelper<'tcx> {
200
200
let fn_ty = bx. fn_decl_backend_type ( fn_abi) ;
201
201
202
202
let fn_attrs = if bx. tcx ( ) . def_kind ( fx. instance . def_id ( ) ) . has_codegen_attrs ( ) {
203
- Some ( bx. tcx ( ) . codegen_fn_attrs ( fx. instance . def_id ( ) ) )
203
+ Some ( bx. tcx ( ) . codegen_instance_attrs ( fx. instance ) )
204
204
} else {
205
205
None
206
206
} ;
Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ impl<'tcx> Inliner<'tcx> for ForceInliner<'tcx> {
248
248
fn on_inline_failure ( & self , callsite : & CallSite < ' tcx > , reason : & ' static str ) {
249
249
let tcx = self . tcx ( ) ;
250
250
let InlineAttr :: Force { attr_span, reason : justification } =
251
- tcx. codegen_fn_attrs ( callsite. callee . def_id ( ) ) . inline
251
+ tcx. codegen_instance_attrs ( callsite. callee . def ) . inline
252
252
else {
253
253
bug ! ( "called on item without required inlining" ) ;
254
254
} ;
@@ -606,7 +606,7 @@ fn try_inlining<'tcx, I: Inliner<'tcx>>(
606
606
let tcx = inliner. tcx ( ) ;
607
607
check_mir_is_available ( inliner, caller_body, callsite. callee ) ?;
608
608
609
- let callee_attrs = tcx. codegen_fn_attrs ( callsite. callee . def_id ( ) ) ;
609
+ let callee_attrs = tcx. codegen_instance_attrs ( callsite. callee . def ) . as_ref ( ) ;
610
610
check_inline:: is_inline_valid_on_fn ( tcx, callsite. callee . def_id ( ) ) ?;
611
611
check_codegen_attributes ( inliner, callsite, callee_attrs) ?;
612
612
inliner. check_codegen_attributes_extra ( callee_attrs) ?;
You can’t perform that action at this time.
0 commit comments