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:
Arnold Schwaighofer
2014-11-03 02:18:35 +00:00
parent 5f32f6b3d8
commit bb47ce9e00

View File

@@ -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;