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/CodeGenFunction.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/CodeGen/CodeGenFunction.h') diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index f6196fe64f..ce4a424c33 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -243,6 +243,18 @@ public: void GenerateObjCSetter(ObjCImplementationDecl *IMP, const ObjCPropertyImplDecl *PID); + struct BlockInfo { + const llvm::Type *BlockLiteralTy; + + const char *NameSuffix; + + BlockInfo(const llvm::Type *blt, const char *ns) + : BlockLiteralTy(blt), NameSuffix(ns) {} + }; + + llvm::Function *GenerateBlockFunction(const BlockExpr *Expr, + const BlockInfo& Info); + void GenerateCode(const FunctionDecl *FD, llvm::Function *Fn); void StartFunction(const Decl *D, QualType RetTy, -- cgit v1.2.3-70-g09d2