Skip to content

Commit 0b5de06

Browse files
authored
Merge pull request #71694 from lorentey/getRetainCount-mess
[stdlib] Do not introduce any new ABI symbols for _get*RetainCount
2 parents c093bc2 + a35741f commit 0b5de06

File tree

4 files changed

+9
-21
lines changed

4 files changed

+9
-21
lines changed

stdlib/public/core/DebuggerSupport.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -349,19 +349,19 @@ internal func _swift_unownedRetainCount(_: UnsafeMutableRawPointer) -> Int
349349
internal func _swift_weakRetainCount(_: UnsafeMutableRawPointer) -> Int
350350

351351
// Utilities to get refcount(s) of class objects.
352-
@backDeployed(before: SwiftStdlib 6.0)
352+
@_alwaysEmitIntoClient
353353
public func _getRetainCount(_ object: AnyObject) -> UInt {
354354
let count = _withHeapObject(of: object) { _swift_retainCount($0) }
355355
return UInt(bitPattern: count)
356356
}
357357

358-
@backDeployed(before: SwiftStdlib 6.0)
358+
@_alwaysEmitIntoClient
359359
public func _getUnownedRetainCount(_ object: AnyObject) -> UInt {
360360
let count = _withHeapObject(of: object) { _swift_unownedRetainCount($0) }
361361
return UInt(bitPattern: count)
362362
}
363363

364-
@backDeployed(before: SwiftStdlib 6.0)
364+
@_alwaysEmitIntoClient
365365
public func _getWeakRetainCount(_ object: AnyObject) -> UInt {
366366
let count = _withHeapObject(of: object) { _swift_weakRetainCount($0) }
367367
return UInt(bitPattern: count)

test/abi/macOS/arm64/stdlib.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@
3636

3737
// Standard Library Symbols
3838

39-
// Swift._getRetainCount(Swift.AnyObject) -> Swift.UInt
40-
Added: _$ss15_getRetainCountySuyXlF
41-
42-
// Swift._getWeakRetainCount(Swift.AnyObject) -> Swift.UInt
43-
Added: _$ss19_getWeakRetainCountySuyXlF
44-
45-
// Swift._getUnownedRetainCount(Swift.AnyObject) -> Swift.UInt
46-
Added: _$ss22_getUnownedRetainCountySuyXlF
47-
4839
// Swift.String.init<A, B where A: Swift._UnicodeEncoding, B: Swift.Sequence, A.CodeUnit == B.Element>(validating: B, as: A.Type) -> Swift.String?
4940
Added: _$sSS10validating2asSSSgq__xmtcs16_UnicodeEncodingRzSTR_7ElementQy_8CodeUnitRtzr0_lufC
5041

test/abi/macOS/x86_64/stdlib.swift

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,6 @@
3636

3737
// Standard Library Symbols
3838

39-
// Swift._getRetainCount(Swift.AnyObject) -> Swift.UInt
40-
Added: _$ss15_getRetainCountySuyXlF
41-
42-
// Swift._getWeakRetainCount(Swift.AnyObject) -> Swift.UInt
43-
Added: _$ss19_getWeakRetainCountySuyXlF
44-
45-
// Swift._getUnownedRetainCount(Swift.AnyObject) -> Swift.UInt
46-
Added: _$ss22_getUnownedRetainCountySuyXlF
47-
4839
// Swift.String.init<A, B where A: Swift._UnicodeEncoding, B: Swift.Sequence, A.CodeUnit == B.Element>(validating: B, as: A.Type) -> Swift.String?
4940
Added: _$sSS10validating2asSSSgq__xmtcs16_UnicodeEncodingRzSTR_7ElementQy_8CodeUnitRtzr0_lufC
5041

test/api-digester/stability-stdlib-abi-without-asserts.test

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ Func _diagnoseUnavailableCodeReached() is a new API without @available attribute
5959
Func _swift_retainCount(_:) is a new API without @available attribute
6060
Func _swift_unownedRetainCount(_:) is a new API without @available attribute
6161
Func _swift_weakRetainCount(_:) is a new API without @available attribute
62+
// And these were temporarily added as ABI in https://github.com/apple/swift/pull/69352,
63+
// but then https://github.com/apple/swift/pull/71694 made them @_aeic before
64+
// they shipped anywhere, but not before they got into the ABI baseline. Fun!
65+
Func _getRetainCount(_:) has been removed
66+
Func _getUnownedRetainCount(_:) has been removed
67+
Func _getWeakRetainCount(_:) has been removed
6268

6369
Struct AnyHashable has added a conformance to an existing protocol _HasCustomAnyHashableRepresentation
6470
Class AnyKeyPath has added a conformance to an existing protocol CustomDebugStringConvertible

0 commit comments

Comments
 (0)