aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
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
commit3d5e06254909d5a58cc5fcff4ebeef1f3faebaf9 (patch)
treef5934a6148b7c03f081b0d4f4ee8730d16384431 /lib/CodeGen/CGBlocks.cpp
parentbf762c9b48673e9686a97fe6ca144d891316164e (diff)
Ensure that we can't break or continue out of a block.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65370 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index d368d20bce..5c09e4b2d5 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/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,