Call get_switch_int_data on a block with SwitchInt terminator
Fix a mix-up of a block with its predecessors in handling of SwitchInt edge effects for backward analysis. Note that this functionality is currently unused, so change has no practical impact.
This commit is contained in:
@@ -113,7 +113,7 @@ impl Direction for Backward {
|
||||
}
|
||||
|
||||
mir::TerminatorKind::SwitchInt { ref targets, ref discr } => {
|
||||
if let Some(mut data) = analysis.get_switch_int_data(block, discr) {
|
||||
if let Some(mut data) = analysis.get_switch_int_data(pred, discr) {
|
||||
let mut tmp = analysis.bottom_value(body);
|
||||
for &value in &body.basic_blocks.switch_sources()[&(block, pred)] {
|
||||
tmp.clone_from(exit_state);
|
||||
|
||||
Reference in New Issue
Block a user