From 6b65a5c8c4236a605565995c499c8f6dc7451c32 Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Sat, 22 Mar 2025 18:52:37 -0600 Subject: [PATCH] AK: Mark Function as SWIFT_UNSAFE_REFERENCE This allows us to import APIs that include a function without crashing the frontend. Without this, it chokes on the move-only behavior of the class. --- AK/Function.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AK/Function.h b/AK/Function.h index 182dc06e104..66843f0dbc0 100644 --- a/AK/Function.h +++ b/AK/Function.h @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -382,7 +383,7 @@ private: static constexpr size_t inline_capacity = 4 * sizeof(void*); alignas(inline_alignment) u8 m_storage[inline_capacity]; -}; +} SWIFT_UNSAFE_REFERENCE; }