]> granicus.if.org Git - clang/commitdiff
Ensure that we can't break or continue out of a block.
authorMike Stump <mrs@apple.com>
Tue, 24 Feb 2009 02:59:30 +0000 (02:59 +0000)
committerMike Stump <mrs@apple.com>
Tue, 24 Feb 2009 02:59:30 +0000 (02:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65370 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.cpp

index d368d20bcecb22dda66660be40917a6853b9522f..5c09e4b2d55eeaf958ff9e80bcb37430a9dbbe67 100644 (file)
@@ -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,