diff options
author | Anders Carlsson <andersca@mac.com> | 2010-04-29 23:51:42 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2010-04-29 23:51:42 +0000 |
commit | 9ffdd45c56e2f143016f6c78fe2d7ca652c1b57a (patch) | |
tree | abbca845845c4680731e85e8807d68c664035589 /lib/CodeGen | |
parent | 63b4385822857374d035128dff3feac131465496 (diff) |
Remove an unnecessary argument to EmitClassCopyAssignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102674 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/CGClass.cpp | 16 | ||||
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 3 |
2 files changed, 8 insertions, 11 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp index bfaa54e866..1641a83a60 100644 --- a/lib/CodeGen/CGClass.cpp +++ b/lib/CodeGen/CGClass.cpp @@ -622,17 +622,16 @@ void CodeGenFunction::EmitClassMemberwiseCopy( /// object from SrcValue to DestValue. Assignment can be either a bitwise /// assignment of via an assignment operator call. // FIXME. Consolidate this with EmitClassMemberwiseCopy as they share a lot. -void CodeGenFunction::EmitClassCopyAssignment( - llvm::Value *Dest, llvm::Value *Src, - const CXXRecordDecl *ClassDecl, - const CXXRecordDecl *BaseClassDecl, - QualType Ty) { +void +CodeGenFunction::EmitClassCopyAssignment(llvm::Value *Dest, llvm::Value *Src, + const CXXRecordDecl *ClassDecl, + const CXXRecordDecl *BaseClassDecl) { if (ClassDecl) { Dest = OldGetAddressOfBaseClass(Dest, ClassDecl, BaseClassDecl); Src = OldGetAddressOfBaseClass(Src, ClassDecl, BaseClassDecl); } if (BaseClassDecl->hasTrivialCopyAssignment()) { - EmitAggregateCopy(Dest, Src, Ty); + EmitAggregateCopy(Dest, Src, getContext().getTagDeclType(BaseClassDecl)); return; } @@ -785,8 +784,7 @@ void CodeGenFunction::SynthesizeCXXCopyAssignment(const FunctionArgList &Args) { CXXRecordDecl *BaseClassDecl = cast<CXXRecordDecl>(Base->getType()->getAs<RecordType>()->getDecl()); - EmitClassCopyAssignment(ThisPtr, SrcPtr, ClassDecl, BaseClassDecl, - Base->getType()); + EmitClassCopyAssignment(ThisPtr, SrcPtr, ClassDecl, BaseClassDecl); } for (CXXRecordDecl::field_iterator Field = ClassDecl->field_begin(), @@ -815,7 +813,7 @@ void CodeGenFunction::SynthesizeCXXCopyAssignment(const FunctionArgList &Args) { } else EmitClassCopyAssignment(LHS.getAddress(), RHS.getAddress(), - 0 /*ClassDecl*/, FieldClassDecl, FieldType); + 0 /*ClassDecl*/, FieldClassDecl); continue; } // Do a built-in assignment of scalar data members. diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 0cd0bd9fe3..3a8f60c4bd 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -823,8 +823,7 @@ public: void EmitClassCopyAssignment(llvm::Value *DestValue, llvm::Value *SrcValue, const CXXRecordDecl *ClassDecl, - const CXXRecordDecl *BaseClassDecl, - QualType Ty); + const CXXRecordDecl *BaseClassDecl); void EmitDelegateCXXConstructorCall(const CXXConstructorDecl *Ctor, CXXCtorType CtorType, |