diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-02-13 08:37:51 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-02-13 08:37:51 +0000 |
commit | 59660c21178b6af518bd4b564e032d5c9cc218cb (patch) | |
tree | ec2b540757d9aa3ffb3cdfbc7ff2048e65f42df4 /lib/CodeGen/CodeGenFunction.h | |
parent | e0dc7c70ee3fc1d6bdd8e2f166cc9e9be89061d9 (diff) |
Emit virtual/deleting destructors properly with -cxx-abi microsoft, PR15058
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175045 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index d43b58830b..ea5e8733d6 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -1179,11 +1179,10 @@ private: llvm::Value *CXXABIThisValue; llvm::Value *CXXThisValue; - /// CXXVTTDecl - When generating code for a base object constructor or - /// base object destructor with virtual bases, this will hold the implicit - /// VTT parameter. - ImplicitParamDecl *CXXVTTDecl; - llvm::Value *CXXVTTValue; + /// CXXStructorImplicitParamDecl - When generating code for a constructor or + /// destructor, this will hold the implicit argument (e.g. VTT). + ImplicitParamDecl *CXXStructorImplicitParamDecl; + llvm::Value *CXXStructorImplicitParamValue; /// OutermostConditional - Points to the outermost active /// conditional control. This is used so that we know if a @@ -1777,9 +1776,19 @@ public: /// LoadCXXVTT - Load the VTT parameter to base constructors/destructors have /// virtual bases. + // FIXME: Every place that calls LoadCXXVTT is something + // that needs to be abstracted properly. llvm::Value *LoadCXXVTT() { - assert(CXXVTTValue && "no VTT value for this function"); - return CXXVTTValue; + assert(CXXStructorImplicitParamValue && "no VTT value for this function"); + return CXXStructorImplicitParamValue; + } + + /// LoadCXXStructorImplicitParam - Load the implicit parameter + /// for a constructor/destructor. + llvm::Value *LoadCXXStructorImplicitParam() { + assert(CXXStructorImplicitParamValue && + "no implicit argument value for this function"); + return CXXStructorImplicitParamValue; } /// GetAddressOfBaseOfCompleteClass - Convert the given pointer to a @@ -2294,7 +2303,8 @@ public: llvm::Value *Callee, ReturnValueSlot ReturnValue, llvm::Value *This, - llvm::Value *VTT, + llvm::Value *ImplicitParam, + QualType ImplicitParamTy, CallExpr::const_arg_iterator ArgBeg, CallExpr::const_arg_iterator ArgEnd); RValue EmitCXXMemberCallExpr(const CXXMemberCallExpr *E, |