are important part of control flow structures.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54078
91177308-0d34-0410-b5e6-
96231b3b80d8
/// 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;
}
-// RUN: clang %s -emit-llvm
+// RUN: clang %s -emit-llvm -o -
int bar();
-int foo() {
+int test0() {
int i;
i = 1 + 2;
do {
}
-int foo1() {
+int test1() {
int i;
i = 1 + 2;
do {
}
-int foo2() {
+int test2() {
int i;
i = 1 + 2;
do {
}
-int foo3() {
+int test3() {
int i;
i = 1 + 2;
do {
}
-int foo4() {
+int test4() {
int i;
i = 1 + 2;
do {
} while(0);
return i;
}
+
+// rdar://6103124
+void test5() {
+ do { break; } while(0);
+}
+
+
+