[cfe-commits] r54322 - /cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
Daniel Dunbar
daniel at zuster.org
Mon Aug 4 10:24:49 PDT 2008
Author: ddunbar
Date: Mon Aug 4 12:24:44 2008
New Revision: 54322
URL: http://llvm.org/viewvc/llvm-project?rev=54322&view=rev
Log:
Avoid creating dummy block when no indirect gotos are present.
Modified:
cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=54322&r1=54321&r2=54322&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Mon Aug 4 12:24:44 2008
@@ -190,6 +190,9 @@
void CodeGenFunction::EmitIndirectSwitches() {
llvm::BasicBlock *Default;
+ if (IndirectSwitches.empty())
+ return;
+
if (!LabelIDs.empty()) {
Default = getBasicBlockForLabel(LabelIDs.begin()->first);
} else {
More information about the cfe-commits
mailing list