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:
parent
cdac44e608
commit
011d4aa81f
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue