summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-02-24 02:59:30 +0000
committerMike Stump <mrs@apple.com>2009-02-24 02:59:30 +0000
commit18e91257e49298267ac242afc3143ab60670c844 (patch)
tree5408b13a041e32b1bbde11f2000967898dd78ee0
parent6e79f3129eccb11d54e6f3c2def4304abe5da6d6 (diff)
downloadbcm5719-llvm-18e91257e49298267ac242afc3143ab60670c844.tar.gz
bcm5719-llvm-18e91257e49298267ac242afc3143ab60670c844.zip
Ensure that we can't break or continue out of a block.
llvm-svn: 65370
-rw-r--r--clang/lib/CodeGen/CGBlocks.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp
index d368d20bcec..5c09e4b2d55 100644
--- a/clang/lib/CodeGen/CGBlocks.cpp
+++ b/clang/lib/CodeGen/CGBlocks.cpp
@@ -412,6 +412,11 @@ llvm::Function *CodeGenFunction::GenerateBlockFunction(const BlockExpr *Expr,
const BlockDecl *BD = Expr->getBlockDecl();
+ // FIXME: there are tons of variables in CGF that are copied, we probably
+ // don't want many of them, any of them. When we trim that, this can go away.
+ // Help ensure no control flow in or out of the block.
+ BreakContinueStack.clear();
+
// FIXME: This leaks
ImplicitParamDecl *SelfDecl =
ImplicitParamDecl::Create(getContext(), 0,
OpenPOWER on IntegriCloud