aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-07-25 23:40:10 +0000
committerChris Lattner <sabre@nondot.org>2008-07-25 23:40:10 +0000
commit1e9660e1fb11efb7e65799bc145c0e2b6f3562be (patch)
treeb83afbc9f07cbe4928435f0462921a6fc840f201 /lib/CodeGen/CodeGenFunction.cpp
parentffc8a6172ef2e5abf01fcf47c77823ee322ff255 (diff)
Fix rdar://6103124, the only dummy blocks are ones without names. Named blocks
are important part of control flow structures. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index ff46fa69c3..679a0f7404 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -148,7 +148,7 @@ void CodeGenFunction::GenerateCode(const FunctionDecl *FD) {
/// isDummyBlock - Return true if BB is an empty basic block
/// with no predecessors.
bool CodeGenFunction::isDummyBlock(const llvm::BasicBlock *BB) {
- if (BB->empty() && pred_begin(BB) == pred_end(BB))
+ if (BB->empty() && pred_begin(BB) == pred_end(BB) && !BB->hasName())
return true;
return false;
}