Merge pull request #15770 from dcci/refcount-obj

This commit is contained in:
swift-ci
2018-04-09 12:12:32 -07:00
committed by GitHub
5 changed files with 55 additions and 0 deletions

View File

@@ -10,6 +10,8 @@
//
//===----------------------------------------------------------------------===//
import SwiftShims
@_frozen // FIXME(sil-serialize-all)
public enum _DebuggerSupport {
@_frozen // FIXME(sil-serialize-all)
@@ -335,3 +337,11 @@ func _stringForPrintObject(_ value: Any) -> String {
public
func _debuggerTestingCheckExpect(_ checked_value: String,
_ expected_value: String) {}
// Utilities to get refcount(s) of class objects.
@_silgen_name("swift_retainCount")
public func _getRetainCount(_ Value: AnyObject) -> UInt
@_silgen_name("swift_unownedRetainCount")
public func _getUnownedRetainCount(_ Value : AnyObject) -> UInt
@_silgen_name("swift_weakRetainCount")
public func _getWeakRetainCount(_ Value : AnyObject) -> UInt