diff options
author | Mike Stump <mrs@apple.com> | 2009-03-04 18:47:42 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-03-04 18:47:42 +0000 |
commit | 6c39666a77d4a57ff003ba127f8489aec6f74849 (patch) | |
tree | 9c5e9b0cd178b6ee8d235a6aa24b26cf9cb59fdf /clang/lib/CodeGen/CGBlocks.h | |
parent | d1b64be776a12cf281dd237ee68f8235b2edc513 (diff) | |
download | bcm5719-llvm-6c39666a77d4a57ff003ba127f8489aec6f74849.tar.gz bcm5719-llvm-6c39666a77d4a57ff003ba127f8489aec6f74849.zip |
Move more of the blocks code up and out.
llvm-svn: 66046
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.h')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.h b/clang/lib/CodeGen/CGBlocks.h index a55c578c0e1..f58831423ef 100644 --- a/clang/lib/CodeGen/CGBlocks.h +++ b/clang/lib/CodeGen/CGBlocks.h @@ -43,6 +43,7 @@ namespace llvm { namespace clang { namespace CodeGen { +class CodeGenModule; class BlockBase { public: @@ -59,11 +60,14 @@ public: class BlockModule : public BlockBase { ASTContext &Context; llvm::Module &TheModule; + const llvm::TargetData &TheTargetData; CodeGenTypes &Types; + CodeGenModule &CGM; ASTContext &getContext() const { return Context; } llvm::Module &getModule() const { return TheModule; } CodeGenTypes &getTypes() { return Types; } + const llvm::TargetData &getTargetData() const { return TheTargetData; } public: llvm::Constant *getNSConcreteGlobalBlock(); llvm::Constant *getNSConcreteStackBlock(); @@ -73,6 +77,8 @@ public: const llvm::Type *getGenericBlockLiteralType(); const llvm::Type *getGenericExtendedBlockLiteralType(); + llvm::Constant *GetAddrOfGlobalBlock(const BlockExpr *BE, const char *); + /// NSConcreteGlobalBlock - Cached reference to the class pointer for global /// blocks. llvm::Constant *NSConcreteGlobalBlock; @@ -88,9 +94,11 @@ public: int GlobalUniqueCount; } Block; - BlockModule(ASTContext &C, llvm::Module &M, CodeGenTypes &T) - : Context(C), TheModule(M), Types(T), NSConcreteGlobalBlock(0), - NSConcreteStackBlock(0), BlockDescriptorType(0), + BlockModule(ASTContext &C, llvm::Module &M, const llvm::TargetData &TD, + CodeGenTypes &T, CodeGenModule &CodeGen) + : Context(C), TheModule(M), TheTargetData(TD), Types(T), + CGM(CodeGen), + NSConcreteGlobalBlock(0), NSConcreteStackBlock(0), BlockDescriptorType(0), GenericBlockLiteralType(0) { Block.GlobalUniqueCount = 0; } |