Skip to content

Commit

Permalink
Print flow state in debug messages for find_dead_unwinds
Browse files Browse the repository at this point in the history
  • Loading branch information
ecstatic-morse committed Feb 14, 2020
1 parent 2aa3935 commit 26451d0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/librustc_mir/transform/elaborate_drops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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);
Expand Down

0 comments on commit 26451d0

Please sign in to comment.