diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-08-04 17:24:44 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-08-04 17:24:44 +0000 |
commit | 76526a5245ec2283b0c85fcef507d4c2dec90715 (patch) | |
tree | 0d39b9b9bc4a9c0bdaa8d7997bfec3c68e60ea28 /lib/CodeGen/CodeGenFunction.cpp | |
parent | 4f4e7e4610f7a6eb8923a3bf6f2951b2dca98608 (diff) |
Avoid creating dummy block when no indirect gotos are present.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54322 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.cpp | 3 |
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 { |