From d5cab5435371b8cc74a9e05ebd40b5995ebad149 Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Thu, 12 Feb 2009 17:55:02 +0000 Subject: Add a very basic implemenation of global blocks. This needs to be cleaned up. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64387 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/CodeGen/CodeGenModule.h') diff --git a/lib/CodeGen/CodeGenModule.h b/lib/CodeGen/CodeGenModule.h index bedefcaa3f..0c3964fd5f 100644 --- a/lib/CodeGen/CodeGenModule.h +++ b/lib/CodeGen/CodeGenModule.h @@ -40,6 +40,7 @@ namespace clang { class ObjCImplementationDecl; class ObjCCategoryImplDecl; class ObjCProtocolDecl; + class BlockExpr; class Decl; class Expr; class Stmt; @@ -121,6 +122,10 @@ class CodeGenModule { /// Obj-C class pointer. llvm::Constant *CFConstantStringClassRef; + /// NSConcreteGlobalBlock - Cached reference to the clas pointer for + /// global blocks. + llvm::Constant *NSConcreteGlobalBlock; + std::vector BuiltinFunctions; public: CodeGenModule(ASTContext &C, const LangOptions &Features, llvm::Module &M, @@ -196,6 +201,8 @@ public: llvm::Constant *GetAddrOfConstantCString(const std::string &str, const char *GlobalName=0); + llvm::Constant *GetAddrOfGlobalBlock(const BlockExpr *BE); + /// getBuiltinLibFunction - Given a builtin id for a function like /// "__builtin_fabsf", return a Function* for "fabsf". llvm::Function *getBuiltinLibFunction(unsigned BuiltinID); -- cgit v1.2.3