]> granicus.if.org Git - clang/commitdiff
Avoid creating dummy block when no indirect gotos are present.
authorDaniel Dunbar <daniel@zuster.org>
Mon, 4 Aug 2008 17:24:44 +0000 (17:24 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Mon, 4 Aug 2008 17:24:44 +0000 (17:24 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54322 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenFunction.cpp

index 9814ae71374b08f3b1d327106b6ae9fbc99d37f4..e153c21b774f9d52595455af10bea1051e231c05 100644 (file)
@@ -190,6 +190,9 @@ unsigned CodeGenFunction::GetIDForAddrOfLabel(const LabelStmt *L) {
 void CodeGenFunction::EmitIndirectSwitches() {
   llvm::BasicBlock *Default;
   
+  if (IndirectSwitches.empty())
+    return;
+  
   if (!LabelIDs.empty()) {
     Default = getBasicBlockForLabel(LabelIDs.begin()->first);
   } else {