diff --git a/Sources/Atomics/Unmanaged extensions.swift b/Sources/Atomics/Unmanaged extensions.swift index f2e07b3..c664959 100644 --- a/Sources/Atomics/Unmanaged extensions.swift +++ b/Sources/Atomics/Unmanaged extensions.swift @@ -16,9 +16,17 @@ internal func _sa_retain_n(_ object: UnsafeMutableRawPointer, _ delta: UInt32) @_silgen_name("_sa_release_n") internal func _sa_release_n(_ object: UnsafeMutableRawPointer, _ delta: UInt32) -#elseif ATOMICS_NATIVE_BUILTINS -@_implementationOnly import _AtomicsShims #else +// Note: with ATOMICS_NATIVE_BUILTINS, this file contains the last remaining +// import of the shims module, and we only need it to get the declarations for +// _sa_retain_n/_sa_release_n. The import is unfortunately still problematic; +// these functions need to be moved into the stdlib or (preferably) we need +// a compiler-level fix for https://github.com/apple/swift/issues/56105 to get rid +// of it. +// +// Hiding the import using @_implementationOnly is not possible unless +// Swift's library evolution dialect is enabled. (Which we cannot easily test +// here.) Perhaps `internal import` will help work around this at some point. import _AtomicsShims #endif