Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 98c83d2

Browse files
committed
Remove leftover of removed hack
1 parent f77fab8 commit 98c83d2

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

src/abi/mod.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,6 @@ fn local_place<'tcx>(
306306
pub(crate) fn codegen_fn_prelude<'tcx>(
307307
fx: &mut FunctionCx<'_, 'tcx, impl Backend>,
308308
start_block: Block,
309-
should_codegen_locals: bool,
310309
) {
311310
let ssa_analyzed = crate::analyze::analyze(fx);
312311

@@ -424,17 +423,13 @@ pub(crate) fn codegen_fn_prelude<'tcx>(
424423
}
425424
}
426425

427-
// HACK should_codegen_locals required for the ``implement `<Box<F> as FnOnce>::call_once`
428-
// without `alloca``` hack in `base::trans_fn`.
429-
if should_codegen_locals {
430-
for local in fx.mir.vars_and_temps_iter() {
431-
let ty = fx.monomorphize(&fx.mir.local_decls[local].ty);
432-
let layout = fx.layout_of(ty);
426+
for local in fx.mir.vars_and_temps_iter() {
427+
let ty = fx.monomorphize(&fx.mir.local_decls[local].ty);
428+
let layout = fx.layout_of(ty);
433429

434-
let is_ssa = ssa_analyzed[local] == crate::analyze::SsaKind::Ssa;
430+
let is_ssa = ssa_analyzed[local] == crate::analyze::SsaKind::Ssa;
435431

436-
local_place(fx, local, layout, is_ssa);
437-
}
432+
local_place(fx, local, layout, is_ssa);
438433
}
439434

440435
fx.bcx

src/base.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ pub(crate) fn trans_fn<'tcx, B: Backend + 'static>(
6161
crate::trap::trap_unreachable(&mut fx, "function has uninhabited argument");
6262
} else {
6363
tcx.sess.time("codegen clif ir", || {
64-
tcx.sess.time("codegen prelude", || crate::abi::codegen_fn_prelude(&mut fx, start_block, true));
64+
tcx.sess.time("codegen prelude", || crate::abi::codegen_fn_prelude(&mut fx, start_block));
6565
codegen_fn_content(&mut fx);
6666
});
6767
}

0 commit comments

Comments
 (0)