Skip to content

Commit 1e11d0f

Browse files
[runtime] Use __has_extension to detect swiftasynccc availability
`swiftasynccc` is now an extension instead of a feature, so we should use `__has_extension` to detect its availability.
1 parent f95fd21 commit 1e11d0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/Runtime/Config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ extern uintptr_t __COMPATIBILITY_LIBRARIES_CANNOT_CHECK_THE_IS_SWIFT_BIT_DIRECTL
228228

229229
// SWIFT_CC(swiftasync) is the Swift async calling convention.
230230
// We assume that it supports mandatory tail call elimination.
231-
#if __has_feature(swiftasynccc) && __has_attribute(swiftasynccall)
231+
#if __has_attribute(swiftasynccall) && (__has_feature(swiftasynccc) || __has_extension(swiftasynccc))
232232
#define SWIFT_CC_swiftasync __attribute__((swiftasynccall))
233233
#else
234234
#define SWIFT_CC_swiftasync SWIFT_CC_swift

0 commit comments

Comments
 (0)