[libcxx-commits] [libcxx] [libc++] Add explicit ABI annotations to functions from the block runtime declared in <__functional/function.h> (PR #140592)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon May 19 11:38:03 PDT 2025
https://github.com/philnik777 created https://github.com/llvm/llvm-project/pull/140592
None
>From dc3a00d239b45372411049b37806eaaf348bdbe9 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Mon, 19 May 2025 20:36:53 +0200
Subject: [PATCH] [libc++] Add explicit ABI annotations to functions from the
block runtime declared in <__functional/function.h>
---
libcxx/include/__functional/function.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libcxx/include/__functional/function.h b/libcxx/include/__functional/function.h
index 5264af30d60d9..d9f857ae24cef 100644
--- a/libcxx/include/__functional/function.h
+++ b/libcxx/include/__functional/function.h
@@ -752,8 +752,9 @@ class __policy_func<_Rp(_ArgTypes...)> {
# if _LIBCPP_HAS_BLOCKS_RUNTIME
-extern "C" void* _Block_copy(const void*);
-extern "C" void _Block_release(const void*);
+_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
+_LIBCPP_EXPORTED_FROM_ABI extern "C" void* _Block_copy(const void*);
+_LIBCPP_EXPORTED_FROM_ABI extern "C" void _Block_release(const void*);
template <class _Rp1, class... _ArgTypes1, class _Alloc, class _Rp, class... _ArgTypes>
class __func<_Rp1 (^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)> : public __base<_Rp(_ArgTypes...)> {
@@ -826,6 +827,7 @@ class __func<_Rp1 (^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)> : public __base
}
# endif // _LIBCPP_HAS_RTTI
};
+_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
# endif // _LIBCPP_HAS_EXTENSION_BLOCKS
More information about the libcxx-commits
mailing list