mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[embedded] Also allow nil in swift_isEscapingClosureAtFileLocation to match the C++ runtime
This commit is contained in:
@@ -279,6 +279,9 @@ public func swift_dynamicCastClassUnconditional(object: UnsafeMutableRawPointer,
|
||||
|
||||
@_cdecl("swift_isEscapingClosureAtFileLocation")
|
||||
public func swift_isEscapingClosureAtFileLocation(object: Builtin.RawPointer, filename: UnsafePointer<CChar>, filenameLength: Int32, line: Int32, column: Int32, verificationType: CUnsignedInt) -> Bool {
|
||||
let objectBits = UInt(Builtin.ptrtoint_Word(object))
|
||||
if objectBits == 0 { return false }
|
||||
|
||||
guard swift_isUniquelyReferenced_native(object: object) else {
|
||||
fatalError("non-escaping closure escaped")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user