From fc3ebd7efd69ef36580247ac06b2a0acaba1e971 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sun, 24 Nov 2024 21:47:35 -0700 Subject: [PATCH] AK: Add workaround for older Xcode versions in Swift.h --- AK/Swift.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/AK/Swift.h b/AK/Swift.h index 84c0b2a333f..4f9855b0783 100644 --- a/AK/Swift.h +++ b/AK/Swift.h @@ -8,6 +8,17 @@ #if __has_include() # include +// FIXME: Workaround for Xcode 14/15. When swif becomes required, we should bump the +// required Xcode verison to one that supports all the features we are using. +# ifndef SWIFT_UNCHECKED_SENDABLE +# define SWIFT_UNCHECKED_SENDABLE +# define SWIFT_NONCOPYABLE +# define SWIFT_NONESCAPABLE +# define SWIFT_ESCAPABLE +# define SWIFT_ESCAPABLE_IF(...) +# define SWIFT_RETURNS_RETAINED +# define SWIFT_RETURNS_UNRETAINED +# endif #else # define SWIFT_SELF_CONTAINED # define SWIFT_RETURNS_INDEPENDENT_VALUE