mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge remote-tracking branch 'origin/master' into master-rebranch
This commit is contained in:
@@ -314,6 +314,7 @@ static bool isNonMutatingArraySemanticCall(SILInstruction *Inst) {
|
||||
case ArrayCallKind::kWithUnsafeMutableBufferPointer:
|
||||
case ArrayCallKind::kArrayInit:
|
||||
case ArrayCallKind::kArrayUninitialized:
|
||||
case ArrayCallKind::kArrayUninitializedIntrinsic:
|
||||
case ArrayCallKind::kAppendContentsOf:
|
||||
case ArrayCallKind::kAppendElement:
|
||||
return false;
|
||||
@@ -662,7 +663,8 @@ bool COWArrayOpt::hasLoopOnlyDestructorSafeArrayOperations() {
|
||||
auto Kind = Sem.getKind();
|
||||
// Safe because they create new arrays.
|
||||
if (Kind == ArrayCallKind::kArrayInit ||
|
||||
Kind == ArrayCallKind::kArrayUninitialized)
|
||||
Kind == ArrayCallKind::kArrayUninitialized ||
|
||||
Kind == ArrayCallKind::kArrayUninitializedIntrinsic)
|
||||
continue;
|
||||
// All array types must be the same. This is a stronger guaranteed than
|
||||
// we actually need. The requirement is that we can't create another
|
||||
|
||||
Reference in New Issue
Block a user