Refactor BranchInfo::Table to no longer have an optional default branch (#5593)

This commit is contained in:
Trevor Elliott
2023-01-18 17:17:03 -08:00
committed by GitHub
parent e260abfce7
commit 7cea73a81d
6 changed files with 22 additions and 28 deletions

View File

@@ -126,9 +126,8 @@ impl ControlFlowGraph {
self.add_edge(block, inst, dest.block(&func.dfg.value_lists));
}
BranchInfo::Table(jt, dest) => {
if let Some(dest) = dest {
self.add_edge(block, inst, dest);
}
self.add_edge(block, inst, dest);
for dest in func.jump_tables[jt].iter() {
self.add_edge(block, inst, *dest);
}