Skip to content

Commit f02ca3b

Browse files
authored
Merge pull request #67822 from apple/revert-66531-pr-8addaa1d85ba6750d500373b55bd9451e869c8e6
Revert "[stdlib] Fix calling convention mismatch for debugger utility functions"
2 parents 1791108 + 20a11db commit f02ca3b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

stdlib/public/core/DebuggerSupport.swift

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -269,12 +269,9 @@ public func _stringForPrintObject(_ value: Any) -> String {
269269
public func _debuggerTestingCheckExpect(_: String, _: String) { }
270270

271271
// Utilities to get refcount(s) of class objects.
272-
public func _getRetainCount(_ Value: AnyObject) -> UInt {
273-
return UInt(bitPattern: swift_retainCount(unsafeBitCast(Value, to: UnsafeMutablePointer<HeapObject>.self)))
274-
}
275-
public func _getUnownedRetainCount(_ Value: AnyObject) -> UInt {
276-
return UInt(bitPattern: swift_unownedRetainCount(unsafeBitCast(Value, to: UnsafeMutablePointer<HeapObject>.self)))
277-
}
278-
public func _getWeakRetainCount(_ Value: AnyObject) -> UInt {
279-
return UInt(bitPattern: swift_weakRetainCount(unsafeBitCast(Value, to: UnsafeMutablePointer<HeapObject>.self)))
280-
}
272+
@_silgen_name("swift_retainCount")
273+
public func _getRetainCount(_ Value: AnyObject) -> UInt
274+
@_silgen_name("swift_unownedRetainCount")
275+
public func _getUnownedRetainCount(_ Value: AnyObject) -> UInt
276+
@_silgen_name("swift_weakRetainCount")
277+
public func _getWeakRetainCount(_ Value: AnyObject) -> UInt

0 commit comments

Comments
 (0)