aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2010-04-30 19:45:28 +0000
committerAnders Carlsson <andersca@mac.com>2010-04-30 19:45:28 +0000
commit106d9ea61c7211b370c5b97a0288652c23da329a (patch)
tree6228c67640ab9ff7c6e0d05936dacc0e28e72883 /lib/CodeGen/CGClass.cpp
parent895162da2d52f4243f61081d7436de66af4503fc (diff)
Remove an unnecessary parameter from EmitClassCopyAssignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 6345ca34ba..56d0e695c5 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -624,19 +624,14 @@ void CodeGenFunction::EmitClassMemberwiseCopy(
// 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 @@ void CodeGenFunction::SynthesizeCXXCopyAssignment(const FunctionArgList &Args) {
/*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 @@ void CodeGenFunction::SynthesizeCXXCopyAssignment(const FunctionArgList &Args) {
}
else
EmitClassCopyAssignment(LHS.getAddress(), RHS.getAddress(),
- 0 /*ClassDecl*/, FieldClassDecl);
+ FieldClassDecl);
continue;
}
// Do a built-in assignment of scalar data members.