diff options
| author | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2025-07-11 08:10:16 +0200 |
|---|---|---|
| committer | Tomasz Miąsko <tomasz.miasko@gmail.com> | 2025-07-11 08:49:11 +0200 |
| commit | 011d4aa81f1d20b4923a01c7162caa5f0042b8ba (patch) | |
| tree | b941f031436d3d784de3447750981e85853ebd30 /compiler/rustc_mir_dataflow | |
| parent | cdac44e608c3df9a241e0a1b53b3f62af250dbf1 (diff) | |
| download | rust-011d4aa81f1d20b4923a01c7162caa5f0042b8ba.tar.gz rust-011d4aa81f1d20b4923a01c7162caa5f0042b8ba.zip | |
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.
Diffstat (limited to 'compiler/rustc_mir_dataflow')
| -rw-r--r-- | compiler/rustc_mir_dataflow/src/framework/direction.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/direction.rs b/compiler/rustc_mir_dataflow/src/framework/direction.rs index cb647476db8..bba652656dd 100644 --- a/compiler/rustc_mir_dataflow/src/framework/direction.rs +++ b/compiler/rustc_mir_dataflow/src/framework/direction.rs @@ -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); |
