We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 875ffa1 commit a298c69Copy full SHA for a298c69
src/abi/mod.rs
@@ -376,9 +376,15 @@ pub(crate) fn codegen_terminator_call<'tcx>(
376
RevealAllLayoutCx(fx.tcx).fn_abi_of_fn_ptr(fn_ty.fn_sig(fx.tcx), extra_args)
377
};
378
379
- let is_cold = instance
380
- .map(|inst| fx.tcx.codegen_fn_attrs(inst.def_id()).flags.contains(CodegenFnAttrFlags::COLD))
381
- .unwrap_or(false);
+ let is_cold = if fn_sig.abi == Abi::RustCold {
+ true
+ } else {
382
+ instance
383
+ .map(|inst| {
384
+ fx.tcx.codegen_fn_attrs(inst.def_id()).flags.contains(CodegenFnAttrFlags::COLD)
385
+ })
386
+ .unwrap_or(false)
387
+ };
388
if is_cold {
389
fx.bcx.set_cold_block(fx.bcx.current_block().unwrap());
390
if let Some(destination_block) = target {
0 commit comments