Move switch_sources from Body to BasicBlocks

This commit is contained in:
Tomasz Miąsko 2022-07-05 00:00:00 +00:00
parent 39d9c1cb1f
commit dfa6a7cbde
2 changed files with 1 additions and 9 deletions

View file

@ -316,7 +316,7 @@ where
fn apply(&mut self, mut apply_edge_effect: impl FnMut(&mut D, SwitchIntTarget)) {
assert!(!self.effects_applied);
let values = &self.body.switch_sources()[&(self.bb, self.pred)];
let values = &self.body.basic_blocks.switch_sources()[&(self.bb, self.pred)];
let targets = values.iter().map(|&value| SwitchIntTarget { value, target: self.bb });
let mut tmp = None;