aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-05-21 04:11:14 +0000
committerJohn McCall <rjmccall@apple.com>2010-05-21 04:11:14 +0000
commitee5042903d53fa7b0fbc1902d0ea07d57c7775b1 (patch)
tree9c6605cd9fe9de4d25a697455de501edfc7acc45 /lib/CodeGen/CodeGenFunction.h
parenta9976d3b192690db20f59dc44099ac4ca939bdb7 (diff)
Allocate space in a block record for implicit references to the Objective C
'self' variable arising from uses of the 'super' keyword. Also reorganize some code so that BlockInfo (now CGBlockInfo) can be opaque outside of CGBlocks.cpp. Fixes rdar://problem/8010633. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@104312 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 048bd0918a..bac05ba705 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -67,6 +67,7 @@ namespace CodeGen {
class CGDebugInfo;
class CGFunctionInfo;
class CGRecordLayout;
+ class CGBlockInfo;
/// CodeGenFunction - This class organizes the per-function state that is used
/// while generating LLVM code.
@@ -501,19 +502,18 @@ public:
std::vector<HelperInfo> *);
llvm::Function *GenerateBlockFunction(const BlockExpr *BExpr,
- const BlockInfo& Info,
+ CGBlockInfo &Info,
const Decl *OuterFuncDecl,
- llvm::DenseMap<const Decl*, llvm::Value*> ldm,
- CharUnits &Size, CharUnits &Align,
- llvm::SmallVectorImpl<const Expr*> &subBlockDeclRefDecls,
- bool &subBlockHasCopyDispose);
+ llvm::DenseMap<const Decl*, llvm::Value*> ldm);
- void BlockForwardSelf();
llvm::Value *LoadBlockStruct();
void AllocateBlockCXXThisPointer(const CXXThisExpr *E);
void AllocateBlockDecl(const BlockDeclRefExpr *E);
- llvm::Value *GetAddrOfBlockDecl(const BlockDeclRefExpr *E);
+ llvm::Value *GetAddrOfBlockDecl(const BlockDeclRefExpr *E) {
+ return GetAddrOfBlockDecl(E->getDecl(), E->isByRef());
+ }
+ llvm::Value *GetAddrOfBlockDecl(const ValueDecl *D, bool ByRef);
const llvm::Type *BuildByRefType(const ValueDecl *D);
void GenerateCode(GlobalDecl GD, llvm::Function *Fn);