Remove start block special case

Edges to the start block are invalid. The special case is unnecessary.
This commit is contained in:
Tomasz Miąsko 2025-03-05 23:36:47 +01:00
parent 30f168ef81
commit 508b803c44

View file

@ -34,7 +34,6 @@ impl<'tcx> crate::MirPass<'tcx> for AddCallGuards {
fn run_pass(&self, _tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
let mut pred_count: IndexVec<_, _> =
body.basic_blocks.predecessors().iter().map(|ps| ps.len()).collect();
pred_count[START_BLOCK] += 1;
// We need a place to store the new blocks generated
let mut new_blocks = Vec::new();