summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-02-28 00:42:31 +0000
committerChris Lattner <sabre@nondot.org>2011-02-28 00:42:31 +0000
commit30db828ce76f09b8a21ad6c83d8d3278e1ec1864 (patch)
tree5dfae2f927ed9e225808b71a6e1ff3617eb3ae3f /clang/lib/CodeGen/CodeGenFunction.cpp
parent6774b1f1c1fb325bc3d2f426dcdbd725ec3c9d73 (diff)
downloadbcm5719-llvm-30db828ce76f09b8a21ad6c83d8d3278e1ec1864.tar.gz
bcm5719-llvm-30db828ce76f09b8a21ad6c83d8d3278e1ec1864.zip
fix my containsBreak predicate.
llvm-svn: 126600
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index 999788f58c3..4ab327712a5 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -421,6 +421,9 @@ bool CodeGenFunction::containsBreak(const Stmt *S) {
// include it and anything inside of it.
if (isa<SwitchStmt>(S) || isa<WhileStmt>(S) || isa<DoStmt>(S) ||
isa<ForStmt>(S))
+ return false;
+
+ if (isa<BreakStmt>(S))
return true;
// Scan subexpressions for verboten breaks.
OpenPOWER on IntegriCloud