summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBlocks.h
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-03-04 19:03:44 +0000
committerMike Stump <mrs@apple.com>2009-03-04 19:03:44 +0000
commit8473a12bfefa382fdba247f7fc603145db7173f9 (patch)
tree9049e7473b8f9478ee76bd0eecf3b8cc44e56fe6 /clang/lib/CodeGen/CGBlocks.h
parent06acea8a690b5c8349920c377b37cdf41e34931b (diff)
downloadbcm5719-llvm-8473a12bfefa382fdba247f7fc603145db7173f9.tar.gz
bcm5719-llvm-8473a12bfefa382fdba247f7fc603145db7173f9.zip
Move more blocks CodeGenFunction code up and out.
llvm-svn: 66049
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.h')
-rw-r--r--clang/lib/CodeGen/CGBlocks.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.h b/clang/lib/CodeGen/CGBlocks.h
index 6c3ca748b9d..bef745945fe 100644
--- a/clang/lib/CodeGen/CGBlocks.h
+++ b/clang/lib/CodeGen/CGBlocks.h
@@ -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);
OpenPOWER on IntegriCloud