[Runtime] Add ObjC support to isKnownUniquelyReferenced.

Add code to support detecting uniquely referenced Objective-C and Core
Foundation objects.

rdar://47902425
rdar://66805490
This commit is contained in:
Alastair Houghton
2021-07-08 17:33:02 +01:00
parent 92b7e135b8
commit abec55f432
10 changed files with 134 additions and 11 deletions

View File

@@ -108,7 +108,7 @@ extension _ArrayBuffer {
if !_isClassOrObjCExistential(Element.self) {
return _storage.isUniquelyReferencedUnflaggedNative()
}
return _storage.isUniquelyReferencedNative() && _isNative
return _storage.isUniquelyReferencedNative()
}
/// Returns `true` and puts the buffer in a mutable state iff the buffer's