aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 1641a83a60..98ed1b3b2f 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -778,13 +778,16 @@ void CodeGenFunction::SynthesizeCXXCopyAssignment(const FunctionArgList &Args) {
for (CXXRecordDecl::base_class_const_iterator Base = ClassDecl->bases_begin();
Base != ClassDecl->bases_end(); ++Base) {
- // FIXME. copy assignment of virtual base NYI
- if (Base->isVirtual())
- continue;
-
+
+ llvm::Value *Dest = GetAddressOfBaseClass(ThisPtr, ClassDecl,
+ CXXBaseSpecifierArray(Base),
+ /*NullCheckValue=*/false);
+ llvm::Value *Src = GetAddressOfBaseClass(SrcPtr, ClassDecl,
+ CXXBaseSpecifierArray(Base),
+ /*NullCheckValue=*/false);
CXXRecordDecl *BaseClassDecl
= cast<CXXRecordDecl>(Base->getType()->getAs<RecordType>()->getDecl());
- EmitClassCopyAssignment(ThisPtr, SrcPtr, ClassDecl, BaseClassDecl);
+ EmitClassCopyAssignment(Dest, Src, 0, BaseClassDecl);
}
for (CXXRecordDecl::field_iterator Field = ClassDecl->field_begin(),