Skip to content

[libc++] Add explicit ABI annotations to functions from the block runtime declared in <__functional/function.h> #140592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

philnik777
Copy link
Contributor

No description provided.

@medismailben
Copy link
Member

@philnik777 #131156 (comment)

I think all the stage1 tests have passed. Can we land this ?

@philnik777 philnik777 marked this pull request as ready for review May 20, 2025 06:25
@philnik777 philnik777 requested a review from a team as a code owner May 20, 2025 06:25
@philnik777 philnik777 merged commit 3e4c9dc into llvm:main May 20, 2025
47 of 54 checks passed
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label May 20, 2025
@llvmbot
Copy link
Member

llvmbot commented May 20, 2025

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/140592.diff

1 Files Affected:

  • (modified) libcxx/include/__functional/function.h (+4-2)
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
 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants