]> granicus.if.org Git - clang/commitdiff
Move more blocks CodeGenFunction code up and out.
authorMike Stump <mrs@apple.com>
Wed, 4 Mar 2009 19:03:44 +0000 (19:03 +0000)
committerMike Stump <mrs@apple.com>
Wed, 4 Mar 2009 19:03:44 +0000 (19:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66049 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGBlocks.h
lib/CodeGen/CodeGenFunction.h

index 6c3ca748b9d166cfab5868059a93f6ff225a37a7..bef745945fe74141f75d547271c882cf63f6cc7c 100644 (file)
@@ -118,10 +118,33 @@ public:
                                       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);
 
index 6455f119c08708a129a50b606f51ea39247520fe..dec265aaf9e9bc1e09129256d10997a3d64e52c7 100644 (file)
@@ -268,34 +268,11 @@ public:
   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();