[cfe-commits] r102676 - /cfe/trunk/lib/CodeGen/CGClass.cpp
Anders Carlsson
andersca at mac.com
Thu Apr 29 17:04:01 PDT 2010
Author: andersca
Date: Thu Apr 29 19:04:01 2010
New Revision: 102676
URL: http://llvm.org/viewvc/llvm-project?rev=102676&view=rev
Log:
Get the base class addresses before calling EmitClassCopyAssignment.
Modified:
cfe/trunk/lib/CodeGen/CGClass.cpp
Modified: cfe/trunk/lib/CodeGen/CGClass.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGClass.cpp?rev=102676&r1=102675&r2=102676&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGClass.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGClass.cpp Thu Apr 29 19:04:01 2010
@@ -778,13 +778,16 @@
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(),
More information about the cfe-commits
mailing list