Fixed a bug in ir-gen for copy assignment synthesis.
Fixed a bug when evaluating those copy-assignments which need by lazily syntheized. A test case for these. llvm-svn: 78965
This commit is contained in:
@@ -739,7 +739,9 @@ void CodeGenModule::DeferredCopyAssignmentToEmit(GlobalDecl CopyAssignDecl) {
|
||||
CXXRecordDecl *BaseClassDecl
|
||||
= cast<CXXRecordDecl>(Base->getType()->getAs<RecordType>()->getDecl());
|
||||
const CXXMethodDecl *MD = 0;
|
||||
if (BaseClassDecl->hasConstCopyAssignment(getContext(), MD))
|
||||
if (!BaseClassDecl->hasTrivialCopyAssignment() &&
|
||||
!BaseClassDecl->hasUserDeclaredCopyAssignment() &&
|
||||
BaseClassDecl->hasConstCopyAssignment(getContext(), MD))
|
||||
GetAddrOfFunction(GlobalDecl(MD), 0);
|
||||
}
|
||||
|
||||
@@ -755,7 +757,9 @@ void CodeGenModule::DeferredCopyAssignmentToEmit(GlobalDecl CopyAssignDecl) {
|
||||
CXXRecordDecl *FieldClassDecl
|
||||
= cast<CXXRecordDecl>(FieldClassType->getDecl());
|
||||
const CXXMethodDecl *MD = 0;
|
||||
if (FieldClassDecl->hasConstCopyAssignment(getContext(), MD))
|
||||
if (!FieldClassDecl->hasTrivialCopyAssignment() &&
|
||||
!FieldClassDecl->hasUserDeclaredCopyAssignment() &&
|
||||
FieldClassDecl->hasConstCopyAssignment(getContext(), MD))
|
||||
GetAddrOfFunction(GlobalDecl(MD), 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user