File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
Sources/_AtomicsShims/include Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -235,7 +235,16 @@ SWIFTATOMIC_DEFINE_TYPE(DoubleWord, _sa_dword)
235235
236236#endif //!defined(ATOMICS_NATIVE_BUILTINS) && defined(__swift__) && !defined(__cplusplus)
237237
238+ #if SWIFTATOMIC_SINGLE_MODULE
239+ // In the single-module configuration, declare _sa_retain_n/_sa_release_n with
240+ // the Swift calling convention, so that they can be easily picked up with
241+ // @_silgen_name'd declarations.
242+ // FIXME: Use @_cdecl("name") once we can switch to a compiler that has it.
238243SWIFTATOMIC_SWIFTCC SWIFTATOMIC_SHIMS_EXPORT void _sa_retain_n (void * object , uint32_t n );
239244SWIFTATOMIC_SWIFTCC SWIFTATOMIC_SHIMS_EXPORT void _sa_release_n (void * object , uint32_t n );
245+ #else
246+ SWIFTATOMIC_SHIMS_EXPORT void _sa_retain_n (void * object , uint32_t n );
247+ SWIFTATOMIC_SHIMS_EXPORT void _sa_release_n (void * object , uint32_t n );
248+ #endif
240249
241250#endif //SWIFTATOMIC_HEADER_INCLUDED
You can’t perform that action at this time.
0 commit comments