aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-02-12 17:55:02 +0000
committerAnders Carlsson <andersca@mac.com>2009-02-12 17:55:02 +0000
commitd5cab5435371b8cc74a9e05ebd40b5995ebad149 (patch)
treee8c27f453388860fb7126260764ca9f730c6053b /lib/CodeGen/CodeGenFunction.h
parenta30b17b90033f40bb909d630466c2a04499b7bf0 (diff)
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
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h12
1 files changed, 12 insertions, 0 deletions
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,