summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/passes/Vacuum.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/passes/Vacuum.cpp b/src/passes/Vacuum.cpp
index ed868f2f9..12565f603 100644
--- a/src/passes/Vacuum.cpp
+++ b/src/passes/Vacuum.cpp
@@ -43,7 +43,8 @@ struct Vacuum : public WalkerPass<PostWalker<Vacuum, Visitor<Vacuum>>> {
}
// if this is an unconditional br, the rest is dead code
Break* br = list[z - skip]->dynCast<Break>();
- if (br && !br->condition) {
+ Switch* sw = list[z - skip]->dynCast<Switch>();
+ if ((br && !br->condition) || sw) {
list.resize(z - skip + 1);
needResize = false;
break;