diff options
author | David Majnemer <david.majnemer@gmail.com> | 2014-11-01 07:37:17 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2014-11-01 07:37:17 +0000 |
commit | 0868137ac8c9661bd345444d17ac1d53bbc1a996 (patch) | |
tree | fb662d8072273eebfc951662728faaa21dabc1f0 /clang/lib/CodeGen/ItaniumCXXABI.cpp | |
parent | b9bd6fb3976684fdfc39dd77b15d231aa4fd352d (diff) | |
download | bcm5719-llvm-0868137ac8c9661bd345444d17ac1d53bbc1a996.tar.gz bcm5719-llvm-0868137ac8c9661bd345444d17ac1d53bbc1a996.zip |
CodeGen: Declutter the emitVirtualObjectDelete interface
No functionality change intended.
llvm-svn: 221043
Diffstat (limited to 'clang/lib/CodeGen/ItaniumCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/ItaniumCXXABI.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/ItaniumCXXABI.cpp b/clang/lib/CodeGen/ItaniumCXXABI.cpp index 93d5ff13ecb..084fd3be5b3 100644 --- a/clang/lib/CodeGen/ItaniumCXXABI.cpp +++ b/clang/lib/CodeGen/ItaniumCXXABI.cpp @@ -106,10 +106,8 @@ public: llvm::Value *Addr, const MemberPointerType *MPT) override; - void emitVirtualObjectDelete(CodeGenFunction &CGF, - const FunctionDecl *OperatorDelete, + void emitVirtualObjectDelete(CodeGenFunction &CGF, const CXXDeleteExpr *DE, llvm::Value *Ptr, QualType ElementType, - bool UseGlobalDelete, const CXXDestructorDecl *Dtor) override; void EmitFundamentalRTTIDescriptor(QualType Type); @@ -851,9 +849,12 @@ bool ItaniumCXXABI::isZeroInitializable(const MemberPointerType *MPT) { /// The Itanium ABI always places an offset to the complete object /// at entry -2 in the vtable. -void ItaniumCXXABI::emitVirtualObjectDelete( - CodeGenFunction &CGF, const FunctionDecl *OperatorDelete, llvm::Value *Ptr, - QualType ElementType, bool UseGlobalDelete, const CXXDestructorDecl *Dtor) { +void ItaniumCXXABI::emitVirtualObjectDelete(CodeGenFunction &CGF, + const CXXDeleteExpr *DE, + llvm::Value *Ptr, + QualType ElementType, + const CXXDestructorDecl *Dtor) { + bool UseGlobalDelete = DE->isGlobalDelete(); if (UseGlobalDelete) { // Derive the complete-object pointer, which is what we need // to pass to the deallocation function. @@ -873,7 +874,8 @@ void ItaniumCXXABI::emitVirtualObjectDelete( // If we're supposed to call the global delete, make sure we do so // even if the destructor throws. - CGF.pushCallObjectDeleteCleanup(OperatorDelete, CompletePtr, ElementType); + CGF.pushCallObjectDeleteCleanup(DE->getOperatorDelete(), CompletePtr, + ElementType); } // FIXME: Provide a source location here even though there's no |