[cfe-commits] r65371 - /cfe/trunk/lib/CodeGen/CGBlocks.cpp

Anders Carlsson andersca at mac.com
Mon Feb 23 20:19:43 PST 2009


Author: andersca
Date: Mon Feb 23 22:19:41 2009
New Revision: 65371

URL: http://llvm.org/viewvc/llvm-project?rev=65371&view=rev
Log:
Pass the CodeGenModule object to GenerateBlockFunction, instead of *this (which will call the copy constructor). 

Also, since we're creating a new CodeGenFunction object for each block function, we don't need to clear the BreakContinueStack.

Modified:
    cfe/trunk/lib/CodeGen/CGBlocks.cpp

Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=65371&r1=65370&r2=65371&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Mon Feb 23 22:19:41 2009
@@ -154,7 +154,7 @@
     BlockInfo Info(0, Name);
     uint64_t subBlockSize;
     llvm::Function *Fn
-      = CodeGenFunction(*this).GenerateBlockFunction(BE, Info, subBlockSize);
+      = CodeGenFunction(CGM).GenerateBlockFunction(BE, Info, subBlockSize);
     Elts.push_back(Fn);
 
     // __descriptor
@@ -412,11 +412,6 @@
 
   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,





More information about the cfe-commits mailing list