@@ -558,7 +558,8 @@ namespace {
558
558
if (auto ctor = dyn_cast<clang::CXXConstructorDecl>(method)) {
559
559
if (ctor->isCopyConstructor () &&
560
560
ctor->getAccess () == clang::AS_public &&
561
- ctor->doesThisDeclarationHaveABody () &&
561
+ // rdar://106964356
562
+ // ctor->doesThisDeclarationHaveABody() &&
562
563
!ctor->isDeleted ())
563
564
return ctor;
564
565
}
@@ -809,6 +810,7 @@ namespace {
809
810
emitCopyWithCopyConstructor (IGF, T, moveConstructor,
810
811
src.getAddress (),
811
812
dest.getAddress ());
813
+ destroy (IGF, src, T, isOutlined);
812
814
return ;
813
815
}
814
816
@@ -828,9 +830,11 @@ namespace {
828
830
void assignWithTake (IRGenFunction &IGF, Address dest, Address src, SILType T,
829
831
bool isOutlined) const override {
830
832
if (auto moveConstructor = findMoveConstructor ()) {
833
+ destroy (IGF, dest, T, isOutlined);
831
834
emitCopyWithCopyConstructor (IGF, T, moveConstructor,
832
835
src.getAddress (),
833
836
dest.getAddress ());
837
+ destroy (IGF, src, T, isOutlined);
834
838
return ;
835
839
}
836
840
0 commit comments