stdlib: Make isUniquelyReferenced shims properly return bool.

rdar://problem/18573806 is fixed.

Swift SVN r23547
This commit is contained in:
Joe Groff
2014-11-22 05:36:38 +00:00
parent f8dfcaa84e
commit b60a30c84b
8 changed files with 30 additions and 32 deletions

View File

@@ -2551,7 +2551,7 @@ internal enum _Variant${Self}Storage<${TypeParametersDecl}> : _HashStorageType {
let o: UnsafePointer<HeapObject> = Builtin.reinterpretCast(self)
let result = _swift_isUniquelyReferenced_native(o)
Builtin.fixLifetime(self)
return result != 0
return result
}
switch self {
@@ -2559,7 +2559,7 @@ internal enum _Variant${Self}Storage<${TypeParametersDecl}> : _HashStorageType {
let o: UnsafePointer<HeapObject> = Builtin.reinterpretCast(self)
let result = _swift_isUniquelyReferenced_native(o)
Builtin.fixLifetime(self)
return result != 0
return result
case .Cocoa:
// Don't consider Cocoa storage mutable, even if it is mutable and is
// uniquely referenced.