diff --git a/AK/Swift.h b/AK/Swift.h new file mode 100644 index 00000000000..be81fdb4cab --- /dev/null +++ b/AK/Swift.h @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2024, Andrew Kaster + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#pragma once + +#if __has_include() +# include +#else +# define SWIFT_SELF_CONTAINED +# define SWIFT_RETURNS_INDEPENDENT_VALUE +# define SWIFT_SHARED_REFERENCE(retain, release) +# define SWIFT_IMMORTAL_REFERENCE +# define SWIFT_UNSAFE_REFERENCE +# define SWIFT_NAME(name) +# define SWIFT_CONFORMS_TO_PROTOCOL(protocol) +# define SWIFT_COMPUTED_PROPERTY +# define SWIFT_MUTATING +#endif diff --git a/Userland/Libraries/LibGfx/Color.cpp b/Userland/Libraries/LibGfx/Color.cpp index ce6a630089f..9417e8d6899 100644 --- a/Userland/Libraries/LibGfx/Color.cpp +++ b/Userland/Libraries/LibGfx/Color.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -18,7 +19,6 @@ #ifdef LIBGFX_USE_SWIFT # include -# include #endif namespace Gfx { diff --git a/Userland/Libraries/LibWebView/Application.h b/Userland/Libraries/LibWebView/Application.h index 7f261568ca2..d9b228b932f 100644 --- a/Userland/Libraries/LibWebView/Application.h +++ b/Userland/Libraries/LibWebView/Application.h @@ -7,6 +7,7 @@ #pragma once #include +#include #include #include #include @@ -14,12 +15,6 @@ #include #include -#ifdef __swift__ -# include -#else -# define SWIFT_IMMORTAL_REFERENCE -#endif - namespace WebView { class Application {