[cfe-commits] r102747 - in /cfe/trunk/lib/CodeGen: CGClass.cpp CodeGenFunction.h
Anders Carlsson
andersca at mac.com
Fri Apr 30 12:45:29 PDT 2010
Author: andersca
Date: Fri Apr 30 14:45:28 2010
New Revision: 102747
URL: http://llvm.org/viewvc/llvm-project?rev=102747&view=rev
Log:
Remove an unnecessary parameter from EmitClassCopyAssignment.
Modified:
cfe/trunk/lib/CodeGen/CGClass.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.h
Modified: cfe/trunk/lib/CodeGen/CGClass.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGClass.cpp?rev=102747&r1=102746&r2=102747&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGClass.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGClass.cpp Fri Apr 30 14:45:28 2010
@@ -624,19 +624,14 @@
// 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) {
- if (ClassDecl) {
- Dest = OldGetAddressOfBaseClass(Dest, ClassDecl, BaseClassDecl);
- Src = OldGetAddressOfBaseClass(Src, ClassDecl, BaseClassDecl);
- }
- if (BaseClassDecl->hasTrivialCopyAssignment()) {
- EmitAggregateCopy(Dest, Src, getContext().getTagDeclType(BaseClassDecl));
+ const CXXRecordDecl *ClassDecl) {
+ if (ClassDecl->hasTrivialCopyAssignment()) {
+ EmitAggregateCopy(Dest, Src, getContext().getTagDeclType(ClassDecl));
return;
}
const CXXMethodDecl *MD = 0;
- BaseClassDecl->hasConstCopyAssignment(getContext(), MD);
+ ClassDecl->hasConstCopyAssignment(getContext(), MD);
assert(MD && "EmitClassCopyAssignment - missing copy assign");
const FunctionProtoType *FPT = MD->getType()->getAs<FunctionProtoType>();
@@ -799,7 +794,7 @@
/*NullCheckValue=*/false);
CXXRecordDecl *BaseClassDecl
= cast<CXXRecordDecl>(Base->getType()->getAs<RecordType>()->getDecl());
- EmitClassCopyAssignment(Dest, Src, 0, BaseClassDecl);
+ EmitClassCopyAssignment(Dest, Src, BaseClassDecl);
}
for (CXXRecordDecl::field_iterator Field = ClassDecl->field_begin(),
@@ -828,7 +823,7 @@
}
else
EmitClassCopyAssignment(LHS.getAddress(), RHS.getAddress(),
- 0 /*ClassDecl*/, FieldClassDecl);
+ FieldClassDecl);
continue;
}
// Do a built-in assignment of scalar data members.
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=102747&r1=102746&r2=102747&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Fri Apr 30 14:45:28 2010
@@ -822,8 +822,7 @@
QualType Ty);
void EmitClassCopyAssignment(llvm::Value *DestValue, llvm::Value *SrcValue,
- const CXXRecordDecl *ClassDecl,
- const CXXRecordDecl *BaseClassDecl);
+ const CXXRecordDecl *ClassDecl);
void EmitDelegateCXXConstructorCall(const CXXConstructorDecl *Ctor,
CXXCtorType CtorType,
More information about the cfe-commits
mailing list