Skip to content

Commit 7f6d866

Browse files
committed
stdlib: add availability attributes to the COW debug checking functions.
This is only relevant for assert builds of the library. Fixes an undefined symbol error if an executable, compiled with an assert build of the stdlib, is back deployed on a platform which does not support lazy symbol binding. rdar://problem/71201102
1 parent 4409f14 commit 7f6d866

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/public/core/Builtin.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,10 +346,12 @@ internal func _class_getInstancePositiveExtentSize(_ theClass: AnyClass) -> Int
346346
}
347347

348348
#if INTERNAL_CHECKS_ENABLED
349+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
349350
@usableFromInline
350351
@_silgen_name("_swift_isImmutableCOWBuffer")
351352
internal func _swift_isImmutableCOWBuffer(_ object: AnyObject) -> Bool
352353

354+
@available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)
353355
@usableFromInline
354356
@_silgen_name("_swift_setImmutableCOWBuffer")
355357
internal func _swift_setImmutableCOWBuffer(_ object: AnyObject, _ immutable: Bool) -> Bool

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,3 @@ Protocol _RuntimeFunctionCountersStats is a new API without @available attribute
4444
Struct _GlobalRuntimeFunctionCountersState is a new API without @available attribute
4545
Struct _ObjectRuntimeFunctionCountersState is a new API without @available attribute
4646
Struct _RuntimeFunctionCounters is a new API without @available attribute
47-
Func _swift_isImmutableCOWBuffer(_:) is a new API without @available attribute
48-
Func _swift_setImmutableCOWBuffer(_:_:) is a new API without @available attribute

0 commit comments

Comments
 (0)