aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 9814ae7137..e153c21b77 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -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 {