Similar to r215768 (which fixed the same case for while loops). To quote
r215768's commit message:
"A little test case simplification - this could be simplified further,
though there are certainly interesting connections to the if/else
construct so I'm hesitant to remove that entirely though it does appear
somewhat unrelated.
(similar fix to r215766, related to PR19864)"
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216297
91177308-0d34-0410-b5e6-
96231b3b80d8
BreakContinueStack.pop_back();
ConditionScope.ForceCleanup();
+
+ EmitStopPoint(&S);
EmitBranch(CondBlock);
ForScope.ForceCleanup();
// CHECK: br label
// CHECK: br label {{.*}}, !dbg [[DBG2:!.*]]
+
+#line 300
+ for (; a; )
+ if (b)
+ ++b; // CHECK: add nsw{{.*}}, 1
+ else
+ ++a; // CHECK: add nsw{{.*}}, 1
+
+ // CHECK: br label
+ // CHECK: br label {{.*}}, !dbg [[DBG3:!.*]]
+
// CHECK: [[DBG1]] = metadata !{i32 100, i32 0, metadata !{{.*}}, null}
// CHECK: [[DBG2]] = metadata !{i32 200, i32 0, metadata !{{.*}}, null}
+ // CHECK: [[DBG3]] = metadata !{i32 300, i32 0, metadata !{{.*}}, null}
}