aboutsummaryrefslogtreecommitdiff
path: root/libcxx/src/algorithm.cpp
diff options
context:
space:
mode:
authorNikolas Klauser <nikolasklauser@berlin.de>2025-05-18 15:47:05 +0200
committerGitHub <noreply@github.com>2025-05-18 15:47:05 +0200
commitc861fe8a71e64f3d2108c58147e7375cd9314521 (patch)
treedc3ea9bd57413493d867724a1679d1b459a14b63 /libcxx/src/algorithm.cpp
parentad3136689090f79b52afcb5a95ec87e893006877 (diff)
downloadllvm-c861fe8a71e64f3d2108c58147e7375cd9314521.zip
llvm-c861fe8a71e64f3d2108c58147e7375cd9314521.tar.gz
llvm-c861fe8a71e64f3d2108c58147e7375cd9314521.tar.bz2
[libc++] Introduce ABI sensitive areas to avoid requiring _LIBCPP_HIDE_FROM_ABI everywhere (#131156)
This patch introduces `_LIBCPP_{BEGIN,END}_EXPLICIT_ABI_ANNOTATIONS`, which allow us to have implicit annotations for most functions, and just where it's not "hide_from_abi everything" we add explicit annotations. This allows us to drop the `_LIBCPP_HIDE_FROM_ABI` macro from most functions in libc++.
Diffstat (limited to 'libcxx/src/algorithm.cpp')
-rw-r--r--libcxx/src/algorithm.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/libcxx/src/algorithm.cpp b/libcxx/src/algorithm.cpp
index d388fee..74d8a62 100644
--- a/libcxx/src/algorithm.cpp
+++ b/libcxx/src/algorithm.cpp
@@ -10,6 +10,7 @@
#include <bit>
_LIBCPP_BEGIN_NAMESPACE_STD
+_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class Comp, class RandomAccessIterator>
void __sort(RandomAccessIterator first, RandomAccessIterator last, Comp comp) {
@@ -44,4 +45,5 @@ template void __sort<__less<double>&, double*>(double*, double*, __less<double>&
template void __sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
// clang-format on
+_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD