Skip to content

Commit

Permalink
Rollup merge of rust-lang#62680 - ecstatic-morse:fix-dataflow-results…
Browse files Browse the repository at this point in the history
…-consumer, r=matthewjasper

Actually call `visit_block_entry` in `DataflowResultsConsumer`

This fixes a trivial bug in `DataflowResultsConsumer`: `visit_block_entry` is never called when visiting dataflow results.

A previous version of rust-lang#62547 used this API and included this fix, but it has since switched to `DataflowResultsCursor` making this commit irrelevant.
  • Loading branch information
Mark-Simulacrum authored Jul 15, 2019
2 parents 879c610 + 2ce227d commit 83ead58
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/librustc_mir/dataflow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ pub(crate) trait DataflowResultsConsumer<'a, 'tcx: 'a> {
}

fn process_basic_block(&mut self, bb: BasicBlock, flow_state: &mut Self::FlowState) {
self.visit_block_entry(bb, flow_state);

let BasicBlockData { ref statements, ref terminator, is_cleanup: _ } =
self.body()[bb];
let mut location = Location { block: bb, statement_index: 0 };
Expand Down

0 comments on commit 83ead58

Please sign in to comment.