mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
COWArrayOpts: strong_release on the array is also harmless
Needed for the upcoming array implementation change. rdar://18777237 Swift SVN r23075
This commit is contained in:
@@ -496,7 +496,7 @@ bool COWArrayOpt::checkSafeArrayElementUse(SILInstruction *UseInst,
|
||||
isRetainReleasedBeforeMutate(UseInst, ArrayVal))
|
||||
return true;
|
||||
|
||||
if (isa<ReleaseValueInst>(UseInst))
|
||||
if (isa<ReleaseValueInst>(UseInst) || isa<StrongReleaseInst>(UseInst))
|
||||
// Releases are always safe. This case handles the release of an array
|
||||
// buffer that is loaded from a local array struct.
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user