mirror of
https://github.com/apple/swift-atomics
synced 2026-11-22 04:20:39 +00:00
Merge pull request #110 from lorentey/there-is-no-such-thing-as-an-implementation-only-import
[native] Stop using @_implementationOnly import in package configs
This commit is contained in:
1 file changed
+10
-2
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user