Skip to content

Commit 976d39f

Browse files
committed
Add 3 cases that I missed to make a switch truly exhaustive.
1 parent 79f29e1 commit 976d39f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/SILOptimizer/Transforms/SimplifyCFG.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2125,6 +2125,10 @@ bool SimplifyCFG::simplifyBlocks() {
21252125
case TermKind::SwitchEnumAddrInst:
21262126
Changed |= simplifyTermWithIdenticalDestBlocks(BB);
21272127
break;
2128+
case TermKind::ThrowInst:
2129+
case TermKind::DynamicMethodBranchInst:
2130+
case TermKind::ReturnInst:
2131+
break;
21282132
case TermKind::Invalid:
21292133
llvm_unreachable("Invalid Term Inst?!");
21302134
}

0 commit comments

Comments
 (0)