Add method to mutate MIR body without invalidating CFG caches.
In addition to adding this method, a handful of passes are updated to use it.
This commit is contained in:
parent
f2d93935ff
commit
26d153ac67
7 changed files with 47 additions and 15 deletions
|
@ -11,7 +11,8 @@ impl<'tcx> MirPass<'tcx> for Deaggregator {
|
|||
}
|
||||
|
||||
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
|
||||
let (basic_blocks, local_decls) = body.basic_blocks_and_local_decls_mut();
|
||||
let (basic_blocks, local_decls, _) =
|
||||
body.basic_blocks_local_decls_mut_and_var_debug_info_no_invalidate();
|
||||
let local_decls = &*local_decls;
|
||||
for bb in basic_blocks {
|
||||
bb.expand_statements(|stmt| {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue