Refactor call terminator to always hold a destination place

This commit is contained in:
Jakob Degen 2022-04-16 09:27:54 -04:00
parent 222c5724ec
commit 09b0936db2
67 changed files with 422 additions and 412 deletions

View file

@ -50,12 +50,7 @@ impl AddCallGuards {
for block in body.basic_blocks_mut() {
match block.terminator {
Some(Terminator {
kind:
TerminatorKind::Call {
destination: Some((_, ref mut destination)),
cleanup,
..
},
kind: TerminatorKind::Call { target: Some(ref mut destination), cleanup, .. },
source_info,
}) if pred_count[*destination] > 1
&& (cleanup.is_some() || self == &AllCallEdges) =>