diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-07-25 23:40:10 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-07-25 23:40:10 +0000 |
| commit | 4591fd0aac8c35ddf6946535cf0f4be7b472eaed (patch) | |
| tree | dee893244f7f09129537e6267b5fbf0de1e6237d /clang/lib/CodeGen/CodeGenFunction.cpp | |
| parent | 54912b3e8dbf944d94fbfd54ab4914ecf39832a5 (diff) | |
Fix rdar://6103124, the only dummy blocks are ones without names. Named blocks
are important part of control flow structures.
llvm-svn: 54078
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index ff46fa69c361..679a0f7404a0 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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; } |
