diff options
author | Mike Stump <mrs@apple.com> | 2009-02-14 22:16:35 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-02-14 22:16:35 +0000 |
commit | 67a6448a8d52ae46d1cba4e474f9f6b3968d2ff9 (patch) | |
tree | 14a831dcb5e300c620837596f17990fcd40ac9a0 /lib/CodeGen/CodeGenFunction.h | |
parent | 3ab75bde6d8d2798a1f400b9335d359e25fb1765 (diff) |
Generate the helper function for blocks. Now basic codegen is
starting to work for blocks.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64570 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index ff505856f5..038db1b305 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -88,7 +88,7 @@ public: const llvm::Type *LLVMIntTy; uint32_t LLVMPointerWidth; - llvm::Constant *BuildBlockLiteralTmp(); + llvm::Constant *BuildBlockLiteralTmp(const BlockExpr *); llvm::Constant *BuildDescriptorBlockDecl(); public: @@ -250,13 +250,16 @@ public: void GenerateObjCSetter(ObjCImplementationDecl *IMP, const ObjCPropertyImplDecl *PID); + /// BlockInfo - Information to generate a block literal. struct BlockInfo { + /// BlockLiteralTy - The type of the block literal. const llvm::Type *BlockLiteralTy; - - const char *NameSuffix; - BlockInfo(const llvm::Type *blt, const char *ns) - : BlockLiteralTy(blt), NameSuffix(ns) {} + /// Name - the name of the function this block was created for, if any + std::string Name; + + BlockInfo(const llvm::Type *blt, std::string n) + : BlockLiteralTy(blt), Name(n) {} }; llvm::Function *GenerateBlockFunction(const BlockExpr *Expr, |