aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/CBackend/CBackend.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/CBackend/CBackend.cpp')
-rw-r--r--lib/Target/CBackend/CBackend.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp
index dea97e92f9..a3607be8a0 100644
--- a/lib/Target/CBackend/CBackend.cpp
+++ b/lib/Target/CBackend/CBackend.cpp
@@ -1057,7 +1057,9 @@ void CWriter::printBranchToBlock(BasicBlock *CurBB, BasicBlock *Succ,
Out << "; /* for PHI node */\n";
}
- if (CurBB->getNext() != Succ || isa<InvokeInst>(CurBB->getTerminator())) {
+ if (CurBB->getNext() != Succ ||
+ isa<InvokeInst>(CurBB->getTerminator()) ||
+ isa<SwitchInst>(CurBB->getTerminator())) {
Out << std::string(Indent, ' ') << " goto ";
writeOperand(Succ);
Out << ";\n";