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/MicrosoftCXXABI.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/MicrosoftCXXABI.cpp')
-rw-r--r-- | clang/lib/CodeGen/MicrosoftCXXABI.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp index 428c7b11a47..5bdda98d68f 100644 --- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp @@ -66,10 +66,8 @@ public: StringRef GetPureVirtualCallName() override { return "_purecall"; } StringRef GetDeletedVirtualCallName() override { return "_purecall"; } - 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; llvm::GlobalVariable *getMSCompleteObjectLocator(const CXXRecordDecl *RD, @@ -652,16 +650,19 @@ MicrosoftCXXABI::getRecordArgABI(const CXXRecordDecl *RD) const { llvm_unreachable("invalid enum"); } -void MicrosoftCXXABI::emitVirtualObjectDelete( - CodeGenFunction &CGF, const FunctionDecl *OperatorDelete, llvm::Value *Ptr, - QualType ElementType, bool UseGlobalDelete, const CXXDestructorDecl *Dtor) { +void MicrosoftCXXABI::emitVirtualObjectDelete(CodeGenFunction &CGF, + const CXXDeleteExpr *DE, + llvm::Value *Ptr, + QualType ElementType, + const CXXDestructorDecl *Dtor) { // FIXME: Provide a source location here even though there's no // CXXMemberCallExpr for dtor call. + bool UseGlobalDelete = DE->isGlobalDelete(); CXXDtorType DtorType = UseGlobalDelete ? Dtor_Complete : Dtor_Deleting; llvm::Value *MDThis = EmitVirtualDestructorCall(CGF, Dtor, DtorType, Ptr, /*CE=*/nullptr); if (UseGlobalDelete) - CGF.EmitDeleteCall(OperatorDelete, MDThis, ElementType); + CGF.EmitDeleteCall(DE->getOperatorDelete(), MDThis, ElementType); } /// \brief Gets the offset to the virtual base that contains the vfptr for |