diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-13 21:53:34 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2010-11-13 21:53:34 +0000 |
commit | 34999876e215b22febc240b1a6dc054215d12f9c (patch) | |
tree | 2c0ec2f204edc053fd9fb6e5efc3c0dbbbf709c5 /lib/CodeGen/CodeGenFunction.h | |
parent | ae2cf767de457df939d07c44b162de5fe0b5e607 (diff) |
Block API patch to do copy ctor of copied-in cxx objects in
copy helper function and dtor of copied cxx objects
in dispose helper functions. __block variables
TBD next.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119011 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 1898c08719..2e9feefe0b 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -1171,6 +1171,11 @@ public: bool ForVirtualBase, llvm::Value *This, CallExpr::const_arg_iterator ArgBeg, CallExpr::const_arg_iterator ArgEnd); + + void EmitSynthesizedCXXCopyCtorCall(const CXXConstructorDecl *D, + llvm::Value *This, llvm::Value *Src, + CallExpr::const_arg_iterator ArgBeg, + CallExpr::const_arg_iterator ArgEnd); void EmitCXXAggrConstructorCall(const CXXConstructorDecl *D, const ConstantArrayType *ArrayTy, @@ -1651,6 +1656,9 @@ public: llvm::GlobalVariable *Addr); void EmitCXXConstructExpr(const CXXConstructExpr *E, AggValueSlot Dest); + + void EmitSynthesizedCXXCopyCtor(llvm::Value *Dest, llvm::Value *Src, + const BlockDeclRefExpr *BDRE); RValue EmitCXXExprWithTemporaries(const CXXExprWithTemporaries *E, AggValueSlot Slot @@ -1799,10 +1807,14 @@ public: /// NeedsObjCSelf - True if something in this block has an implicit /// reference to 'self'. - bool NeedsObjCSelf; - + bool NeedsObjCSelf : 1; + + /// HasCXXObject - True if block has imported c++ object requiring copy + /// construction in copy helper and destruction in copy dispose helpers. + bool HasCXXObject : 1; + /// These are initialized by GenerateBlockFunction. - bool BlockHasCopyDispose; + bool BlockHasCopyDispose : 1; CharUnits BlockSize; CharUnits BlockAlign; llvm::SmallVector<const Expr*, 8> BlockLayout; |