diff options
| author | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-02-13 21:34:19 -0800 |
|---|---|---|
| committer | Dylan MacKenzie <ecstaticmorse@gmail.com> | 2020-02-13 21:34:19 -0800 |
| commit | 26451d007e7482f0c4cdae152a972f4e7c8bf970 (patch) | |
| tree | aca462259536ed7ca4aa3af521ee77af74830dab /src | |
| parent | 2aa39350d3dde13f5e82f24d42a51cbfe92f723e (diff) | |
| download | rust-26451d007e7482f0c4cdae152a972f4e7c8bf970.tar.gz rust-26451d007e7482f0c4cdae152a972f4e7c8bf970.zip | |
Print flow state in debug messages for `find_dead_unwinds`
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustc_mir/transform/elaborate_drops.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/librustc_mir/transform/elaborate_drops.rs b/src/librustc_mir/transform/elaborate_drops.rs index a4531e53ce1..5d02074aaaa 100644 --- a/src/librustc_mir/transform/elaborate_drops.rs +++ b/src/librustc_mir/transform/elaborate_drops.rs @@ -91,7 +91,7 @@ fn find_dead_unwinds<'tcx>( _ => continue, }; - debug!("find_dead_unwinds @ {:?}: {:?}; init_data={:?}", bb, bb_data, flow_inits.get()); + debug!("find_dead_unwinds @ {:?}: {:?}", bb, bb_data); let path = match env.move_data.rev_lookup.find(location.as_ref()) { LookupResult::Exact(e) => e, @@ -101,9 +101,15 @@ fn find_dead_unwinds<'tcx>( } }; - debug!("find_dead_unwinds @ {:?}: path({:?})={:?}", bb, location, path); - flow_inits.seek_before(body.terminator_loc(bb)); + debug!( + "find_dead_unwinds @ {:?}: path({:?})={:?}; init_data={:?}", + bb, + location, + path, + flow_inits.get() + ); + let mut maybe_live = false; on_all_drop_children_bits(tcx, body, &env, path, |child| { maybe_live |= flow_inits.contains(child); |
