[cfe-commits] r66049 - in /cfe/trunk/lib/CodeGen: CGBlocks.h CodeGenFunction.h

Mike Stump mrs at apple.com
Wed Mar 4 11:03:44 PST 2009


Author: mrs
Date: Wed Mar  4 13:03:44 2009
New Revision: 66049

URL: http://llvm.org/viewvc/llvm-project?rev=66049&view=rev
Log:
Move more blocks CodeGenFunction code up and out.

Modified:
    cfe/trunk/lib/CodeGen/CGBlocks.h
    cfe/trunk/lib/CodeGen/CodeGenFunction.h

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

==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.h (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.h Wed Mar  4 13:03:44 2009
@@ -118,10 +118,33 @@
                                       support routines */
   };
 
+  /// BlockInfo - Information to generate a block literal.
+  struct BlockInfo {
+    /// BlockLiteralTy - The type of the block literal.
+    const llvm::Type *BlockLiteralTy;
+
+    /// Name - the name of the function this block was created for, if any
+    const char *Name;
+
+    /// ByCopyDeclRefs - Variables from parent scopes that have been imported
+    /// into this block.
+    llvm::SmallVector<const BlockDeclRefExpr *, 8> ByCopyDeclRefs;
+    
+    // ByRefDeclRefs - __block variables from parent scopes that have been 
+    // imported into this block.
+    llvm::SmallVector<const BlockDeclRefExpr *, 8> ByRefDeclRefs;
+    
+    BlockInfo(const llvm::Type *blt, const char *n)
+      : BlockLiteralTy(blt), Name(n) {}
+  };
+
   CGBuilderTy &Builder;
 
   BlockFunction(CGBuilderTy &B) : Builder(B) { }
 
+  ImplicitParamDecl *BlockStructDecl;
+  ImplicitParamDecl *getBlockStructDecl() { return BlockStructDecl; }
+
   llvm::Value *BuildCopyHelper(int flag);
   llvm::Value *BuildDestroyHelper(int flag);
 

Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=66049&r1=66048&r2=66049&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Wed Mar  4 13:03:44 2009
@@ -268,34 +268,11 @@
   llvm::Value *BuildBlockLiteralTmp(const BlockExpr *);
   llvm::Constant *BuildDescriptorBlockDecl(uint64_t Size);
 
-  /// BlockInfo - Information to generate a block literal.
-  struct BlockInfo {
-    /// BlockLiteralTy - The type of the block literal.
-    const llvm::Type *BlockLiteralTy;
-
-    /// Name - the name of the function this block was created for, if any
-    const char *Name;
-
-    /// ByCopyDeclRefs - Variables from parent scopes that have been imported
-    /// into this block.
-    llvm::SmallVector<const BlockDeclRefExpr *, 8> ByCopyDeclRefs;
-    
-    // ByRefDeclRefs - __block variables from parent scopes that have been 
-    // imported into this block.
-    llvm::SmallVector<const BlockDeclRefExpr *, 8> ByRefDeclRefs;
-    
-    BlockInfo(const llvm::Type *blt, const char *n)
-      : BlockLiteralTy(blt), Name(n) {}
-  };
-
   llvm::Function *GenerateBlockFunction(const BlockExpr *BExpr,
                                         const BlockInfo& Info,
                                         uint64_t &Size, uint64_t &Align,
                                         llvm::SmallVector<const Expr *, 8> &subBlockDeclRefDecls);
 
-  ImplicitParamDecl *BlockStructDecl;
-
-  ImplicitParamDecl *getBlockStructDecl() { return BlockStructDecl; }
 
   llvm::Value *LoadBlockStruct();
 





More information about the cfe-commits mailing list