mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
COWArrayOpt: We could (and are now) also use a strong retain on the array storage
Swift SVN r22998
This commit is contained in:
@@ -492,7 +492,7 @@ bool COWArrayOpt::checkSafeArrayValueUses(UserList &ArrayValueUsers) {
|
||||
/// set is necessary.
|
||||
bool COWArrayOpt::checkSafeArrayElementUse(SILInstruction *UseInst,
|
||||
SILValue ArrayVal) {
|
||||
if (isa<RetainValueInst>(UseInst) &&
|
||||
if ((isa<RetainValueInst>(UseInst) || isa<StrongRetainInst>(UseInst)) &&
|
||||
isRetainReleasedBeforeMutate(UseInst, ArrayVal))
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user