Use zero based indexing for pass_count
This commit is contained in:
parent
80dcc52934
commit
c7e94b0efd
3 changed files with 5 additions and 3 deletions
|
@ -140,6 +140,7 @@ fn run_passes_inner<'tcx>(
|
|||
}
|
||||
|
||||
body.phase = new_phase;
|
||||
body.pass_count = 0;
|
||||
|
||||
dump_mir_for_phase_change(tcx, body);
|
||||
if validate || new_phase == MirPhase::Runtime(RuntimePhase::Optimized) {
|
||||
|
@ -171,5 +172,6 @@ pub fn dump_mir_for_pass<'tcx>(
|
|||
}
|
||||
|
||||
pub fn dump_mir_for_phase_change<'tcx>(tcx: TyCtxt<'tcx>, body: &Body<'tcx>) {
|
||||
assert_eq!(body.pass_count, 0);
|
||||
mir::dump_mir(tcx, true, body.phase.name(), &"after", body, |_, _| Ok(()))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue