From: Alexey Samsonov Date: Thu, 10 Mar 2016 00:20:37 +0000 (+0000) Subject: EmitCXXStructorCall -> EmitCXXDestructorCall. NFC. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b49f2d5808ce1f4e04d23b26e808119318e21c34;p=clang EmitCXXStructorCall -> EmitCXXDestructorCall. NFC. This function is only used in Microsoft ABI and only to emit destructors. Rename/simplify it accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@263081 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index 27948bb627..64ed42b18d 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -82,15 +82,15 @@ RValue CodeGenFunction::EmitCXXMemberOrOperatorCall( Callee, ReturnValue, Args, MD); } -RValue CodeGenFunction::EmitCXXStructorCall( - const CXXMethodDecl *MD, llvm::Value *Callee, ReturnValueSlot ReturnValue, - llvm::Value *This, llvm::Value *ImplicitParam, QualType ImplicitParamTy, - const CallExpr *CE, StructorType Type) { +RValue CodeGenFunction::EmitCXXDestructorCall( + const CXXDestructorDecl *DD, llvm::Value *Callee, llvm::Value *This, + llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *CE, + StructorType Type) { CallArgList Args; - commonEmitCXXMemberOrOperatorCall(*this, MD, This, ImplicitParam, + commonEmitCXXMemberOrOperatorCall(*this, DD, This, ImplicitParam, ImplicitParamTy, CE, Args); - return EmitCall(CGM.getTypes().arrangeCXXStructorDeclaration(MD, Type), - Callee, ReturnValue, Args, MD); + return EmitCall(CGM.getTypes().arrangeCXXStructorDeclaration(DD, Type), + Callee, ReturnValueSlot(), Args, DD); } static CXXRecordDecl *getCXXRecord(const Expr *E) { diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 13a3acbaed..85d5f7a432 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -2710,11 +2710,10 @@ public: ReturnValueSlot ReturnValue, llvm::Value *This, llvm::Value *ImplicitParam, QualType ImplicitParamTy, const CallExpr *E); - RValue EmitCXXStructorCall(const CXXMethodDecl *MD, llvm::Value *Callee, - ReturnValueSlot ReturnValue, llvm::Value *This, - llvm::Value *ImplicitParam, - QualType ImplicitParamTy, const CallExpr *E, - StructorType Type); + RValue EmitCXXDestructorCall(const CXXDestructorDecl *DD, llvm::Value *Callee, + llvm::Value *This, llvm::Value *ImplicitParam, + QualType ImplicitParamTy, const CallExpr *E, + StructorType Type); RValue EmitCXXMemberCallExpr(const CXXMemberCallExpr *E, ReturnValueSlot ReturnValue); RValue EmitCXXMemberOrOperatorMemberCallExpr(const CallExpr *CE, diff --git a/lib/CodeGen/MicrosoftCXXABI.cpp b/lib/CodeGen/MicrosoftCXXABI.cpp index ebf5497f0e..ed2cb21b0a 100644 --- a/lib/CodeGen/MicrosoftCXXABI.cpp +++ b/lib/CodeGen/MicrosoftCXXABI.cpp @@ -1494,10 +1494,10 @@ void MicrosoftCXXABI::EmitDestructorCall(CodeGenFunction &CGF, This, false); } - CGF.EmitCXXStructorCall(DD, Callee, ReturnValueSlot(), This.getPointer(), - /*ImplicitParam=*/nullptr, - /*ImplicitParamTy=*/QualType(), nullptr, - getFromDtorType(Type)); + CGF.EmitCXXDestructorCall(DD, Callee, This.getPointer(), + /*ImplicitParam=*/nullptr, + /*ImplicitParamTy=*/QualType(), nullptr, + getFromDtorType(Type)); } void MicrosoftCXXABI::emitVTableBitSetEntries(VPtrInfo *Info, @@ -1849,10 +1849,9 @@ llvm::Value *MicrosoftCXXABI::EmitVirtualDestructorCall( DtorType == Dtor_Deleting); This = adjustThisArgumentForVirtualFunctionCall(CGF, GD, This, true); - RValue RV = CGF.EmitCXXStructorCall(Dtor, Callee, ReturnValueSlot(), - This.getPointer(), - ImplicitParam, Context.IntTy, CE, - StructorType::Deleting); + RValue RV = + CGF.EmitCXXDestructorCall(Dtor, Callee, This.getPointer(), ImplicitParam, + Context.IntTy, CE, StructorType::Deleting); return RV.getScalarVal(); }