[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++.
This commit is contained in:
Nikolas Klauser 2025-05-18 15:47:05 +02:00 committed by GitHub
parent ad31366890
commit c861fe8a71
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
119 changed files with 301 additions and 52 deletions

View File

@ -65,6 +65,7 @@ private:
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE) || defined(_LIBCPP_BUILDING_LIBRARY)
class _LIBCPP_EXPORTED_FROM_ABI __rs_default;
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();
class _LIBCPP_EXPORTED_FROM_ABI __rs_default {
@ -90,6 +91,7 @@ public:
};
_LIBCPP_EXPORTED_FROM_ABI __rs_default __rs_get();
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_DEPRECATED_IN_CXX14 void

View File

@ -64,7 +64,7 @@ enum { __block_size = sizeof(uint64_t) * 8 };
// Ensures that __c(*__x, *__y) is true by swapping *__x and *__y if necessary.
template <class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
inline _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
__cond_swap(_RandomAccessIterator __x, _RandomAccessIterator __y, _Compare __c) {
// Note: this function behaves correctly even with proxy iterators (because it relies on `value_type`).
using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
@ -78,7 +78,7 @@ __cond_swap(_RandomAccessIterator __x, _RandomAccessIterator __y, _Compare __c)
// Ensures that *__x, *__y and *__z are ordered according to the comparator __c,
// under the assumption that *__y and *__z are already ordered.
template <class _Compare, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
inline _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
__partially_sorted_swap(_RandomAccessIterator __x, _RandomAccessIterator __y, _RandomAccessIterator __z, _Compare __c) {
// Note: this function behaves correctly even with proxy iterators (because it relies on `value_type`).
using value_type = typename iterator_traits<_RandomAccessIterator>::value_type;
@ -97,7 +97,7 @@ template <class,
class _Compare,
class _RandomAccessIterator,
__enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
inline _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
__sort3(_RandomAccessIterator __x1, _RandomAccessIterator __x2, _RandomAccessIterator __x3, _Compare __c) {
bool __swapped1 = std::__cond_swap<_Compare>(__x2, __x3, __c);
bool __swapped2 = std::__partially_sorted_swap<_Compare>(__x1, __x2, __x3, __c);
@ -108,7 +108,7 @@ template <class _AlgPolicy,
class _Compare,
class _RandomAccessIterator,
__enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
inline _LIBCPP_CONSTEXPR_SINCE_CXX14 bool
__sort3(_RandomAccessIterator __x, _RandomAccessIterator __y, _RandomAccessIterator __z, _Compare __c) {
using _Ops = _IterOps<_AlgPolicy>;
@ -140,7 +140,7 @@ template <class,
class _Compare,
class _RandomAccessIterator,
__enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
inline void
__sort4(_RandomAccessIterator __x1,
_RandomAccessIterator __x2,
_RandomAccessIterator __x3,
@ -157,7 +157,7 @@ template <class _AlgPolicy,
class _Compare,
class _RandomAccessIterator,
__enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
inline void
__sort4(_RandomAccessIterator __x1,
_RandomAccessIterator __x2,
_RandomAccessIterator __x3,
@ -182,7 +182,7 @@ template <class _AlgPolicy,
class _Compare,
class _RandomAccessIterator,
__enable_if_t<__use_branchless_sort<_Compare, _RandomAccessIterator>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
inline void
__sort5(_RandomAccessIterator __x1,
_RandomAccessIterator __x2,
_RandomAccessIterator __x3,
@ -201,7 +201,7 @@ template <class _AlgPolicy,
class _Compare,
class _RandomAccessIterator,
__enable_if_t<!__use_branchless_sort<_Compare, _RandomAccessIterator>, int> = 0>
inline _LIBCPP_HIDE_FROM_ABI void
inline void
__sort5(_RandomAccessIterator __x1,
_RandomAccessIterator __x2,
_RandomAccessIterator __x3,
@ -227,7 +227,7 @@ __sort5(_RandomAccessIterator __x1,
// Assumes size > 0
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
_LIBCPP_CONSTEXPR_SINCE_CXX14 void
__selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
_BidirectionalIterator __lm1 = __last;
for (--__lm1; __first != __lm1; ++__first) {
@ -240,7 +240,7 @@ __selection_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
// Sort the iterator range [__first, __last) using the comparator __comp using
// the insertion sort algorithm.
template <class _AlgPolicy, class _Compare, class _BidirectionalIterator>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX26 void
_LIBCPP_CONSTEXPR_SINCE_CXX26 void
__insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
@ -270,8 +270,7 @@ __insertion_sort(_BidirectionalIterator __first, _BidirectionalIterator __last,
// Assumes that there is an element in the position (__first - 1) and that each
// element in the input range is greater or equal to the element at __first - 1.
template <class _AlgPolicy, class _Compare, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI void
__insertion_sort_unguarded(_RandomAccessIterator const __first, _RandomAccessIterator __last, _Compare __comp) {
void __insertion_sort_unguarded(_RandomAccessIterator const __first, _RandomAccessIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
typedef typename iterator_traits<_RandomAccessIterator>::value_type value_type;
@ -298,8 +297,7 @@ __insertion_sort_unguarded(_RandomAccessIterator const __first, _RandomAccessIte
}
template <class _AlgPolicy, class _Comp, class _RandomAccessIterator>
_LIBCPP_HIDE_FROM_ABI bool
__insertion_sort_incomplete(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
bool __insertion_sort_incomplete(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
using _Ops = _IterOps<_AlgPolicy>;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@ -352,7 +350,7 @@ __insertion_sort_incomplete(_RandomAccessIterator __first, _RandomAccessIterator
}
template <class _AlgPolicy, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI void __swap_bitmap_pos(
inline void __swap_bitmap_pos(
_RandomAccessIterator __first, _RandomAccessIterator __last, uint64_t& __left_bitset, uint64_t& __right_bitset) {
using _Ops = _IterOps<_AlgPolicy>;
typedef typename std::iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@ -370,7 +368,7 @@ inline _LIBCPP_HIDE_FROM_ABI void __swap_bitmap_pos(
template <class _Compare,
class _RandomAccessIterator,
class _ValueType = typename iterator_traits<_RandomAccessIterator>::value_type>
inline _LIBCPP_HIDE_FROM_ABI void
inline void
__populate_left_bitset(_RandomAccessIterator __first, _Compare __comp, _ValueType& __pivot, uint64_t& __left_bitset) {
// Possible vectorization. With a proper "-march" flag, the following loop
// will be compiled into a set of SIMD instructions.
@ -386,7 +384,7 @@ __populate_left_bitset(_RandomAccessIterator __first, _Compare __comp, _ValueTyp
template <class _Compare,
class _RandomAccessIterator,
class _ValueType = typename iterator_traits<_RandomAccessIterator>::value_type>
inline _LIBCPP_HIDE_FROM_ABI void
inline void
__populate_right_bitset(_RandomAccessIterator __lm1, _Compare __comp, _ValueType& __pivot, uint64_t& __right_bitset) {
// Possible vectorization. With a proper "-march" flag, the following loop
// will be compiled into a set of SIMD instructions.
@ -403,7 +401,7 @@ template <class _AlgPolicy,
class _Compare,
class _RandomAccessIterator,
class _ValueType = typename iterator_traits<_RandomAccessIterator>::value_type>
inline _LIBCPP_HIDE_FROM_ABI void __bitset_partition_partial_blocks(
inline void __bitset_partition_partial_blocks(
_RandomAccessIterator& __first,
_RandomAccessIterator& __lm1,
_Compare __comp,
@ -450,7 +448,7 @@ inline _LIBCPP_HIDE_FROM_ABI void __bitset_partition_partial_blocks(
}
template <class _AlgPolicy, class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI void __swap_bitmap_pos_within(
inline void __swap_bitmap_pos_within(
_RandomAccessIterator& __first, _RandomAccessIterator& __lm1, uint64_t& __left_bitset, uint64_t& __right_bitset) {
using _Ops = _IterOps<_AlgPolicy>;
typedef typename std::iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@ -491,7 +489,7 @@ inline _LIBCPP_HIDE_FROM_ABI void __swap_bitmap_pos_within(
// __bitset_partition uses bitsets for storing outcomes of the comparisons
// between the pivot and other elements.
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
_LIBCPP_HIDE_FROM_ABI std::pair<_RandomAccessIterator, bool>
std::pair<_RandomAccessIterator, bool>
__bitset_partition(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
typedef typename std::iterator_traits<_RandomAccessIterator>::value_type value_type;
@ -583,7 +581,7 @@ __bitset_partition(_RandomAccessIterator __first, _RandomAccessIterator __last,
// the provided range is already sorted, false otherwise. We assume that the
// length of the range is at least three elements.
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
_LIBCPP_HIDE_FROM_ABI std::pair<_RandomAccessIterator, bool>
std::pair<_RandomAccessIterator, bool>
__partition_with_equals_on_right(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@ -651,7 +649,7 @@ __partition_with_equals_on_right(_RandomAccessIterator __first, _RandomAccessIte
// Similar to the above function. Elements equivalent to the pivot are put to
// the left of the pivot. Returns the iterator to the pivot element.
template <class _AlgPolicy, class _RandomAccessIterator, class _Compare>
_LIBCPP_HIDE_FROM_ABI _RandomAccessIterator
_RandomAccessIterator
__partition_with_equals_on_left(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp) {
using _Ops = _IterOps<_AlgPolicy>;
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
@ -828,6 +826,7 @@ void __introsort(_RandomAccessIterator __first,
}
}
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _Comp, class _RandomAccessIterator>
void __sort(_RandomAccessIterator, _RandomAccessIterator, _Comp);
@ -856,9 +855,10 @@ extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<float>&, float*>(fl
extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<double>&, double*>(double*, double*, __less<double>&);
extern template _LIBCPP_EXPORTED_FROM_ABI void
__sort<__less<long double>&, long double*>(long double*, long double*, __less<long double>&);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
_LIBCPP_CONSTEXPR_SINCE_CXX20 void
__sort_dispatch(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
typedef typename iterator_traits<_RandomAccessIterator>::difference_type difference_type;
difference_type __depth_limit = 2 * std::__bit_log2(std::__to_unsigned_like(__last - __first));
@ -895,20 +895,20 @@ using __sort_is_specialized_in_library _LIBCPP_NODEBUG = __is_any_of<
long double>;
template <class _AlgPolicy, class _Type, __enable_if_t<__sort_is_specialized_in_library<_Type>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, __less<>&) {
void __sort_dispatch(_Type* __first, _Type* __last, __less<>&) {
__less<_Type> __comp;
std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
}
template <class _AlgPolicy, class _Type, __enable_if_t<__sort_is_specialized_in_library<_Type>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, less<_Type>&) {
void __sort_dispatch(_Type* __first, _Type* __last, less<_Type>&) {
__less<_Type> __comp;
std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
}
#if _LIBCPP_STD_VER >= 14
template <class _AlgPolicy, class _Type, __enable_if_t<__sort_is_specialized_in_library<_Type>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, less<>&) {
void __sort_dispatch(_Type* __first, _Type* __last, less<>&) {
__less<_Type> __comp;
std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
}
@ -916,14 +916,14 @@ _LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, less<>
#if _LIBCPP_STD_VER >= 20
template <class _AlgPolicy, class _Type, __enable_if_t<__sort_is_specialized_in_library<_Type>::value, int> = 0>
_LIBCPP_HIDE_FROM_ABI void __sort_dispatch(_Type* __first, _Type* __last, ranges::less&) {
void __sort_dispatch(_Type* __first, _Type* __last, ranges::less&) {
__less<_Type> __comp;
std::__sort<__less<_Type>&, _Type*>(__first, __last, __comp);
}
#endif
template <class _AlgPolicy, class _RandomAccessIterator, class _Comp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void
__sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp& __comp) {
std::__debug_randomize_range<_AlgPolicy>(__first, __last);
@ -937,14 +937,13 @@ __sort_impl(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp&
}
template <class _RandomAccessIterator, class _Comp>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void
sort(_RandomAccessIterator __first, _RandomAccessIterator __last, _Comp __comp) {
std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
}
template <class _RandomAccessIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 void
sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
inline _LIBCPP_CONSTEXPR_SINCE_CXX20 void sort(_RandomAccessIterator __first, _RandomAccessIterator __last) {
std::sort(__first, __last, __less<>());
}

View File

@ -58,6 +58,7 @@ struct __atomic_waitable< _Tp,
#if _LIBCPP_STD_VER >= 20
# if _LIBCPP_HAS_THREADS
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT;
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT;
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t
@ -73,6 +74,7 @@ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t
__libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*) _NOEXCEPT;
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void
__libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t) _NOEXCEPT;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _AtomicWaitable, class _Poll>
struct __atomic_wait_backoff_impl {

View File

@ -35,6 +35,7 @@ struct __from_chars_result {
errc __ec;
};
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _Fp>
_LIBCPP_EXPORTED_FROM_ABI __from_chars_result<_Fp> __from_chars_floating_point(
_LIBCPP_NOESCAPE const char* __first, _LIBCPP_NOESCAPE const char* __last, chars_format __fmt);
@ -44,6 +45,7 @@ extern template __from_chars_result<float> __from_chars_floating_point(
extern template __from_chars_result<double> __from_chars_floating_point(
_LIBCPP_NOESCAPE const char* __first, _LIBCPP_NOESCAPE const char* __last, chars_format __fmt);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _Fp>
_LIBCPP_HIDE_FROM_ABI from_chars_result

View File

@ -18,10 +18,11 @@
# pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 17
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
to_chars(char* __first, char* __last, float __value);
@ -48,8 +49,10 @@ to_chars(char* __first, char* __last, double __value, chars_format __fmt, int __
_LIBCPP_AVAILABILITY_TO_CHARS_FLOATING_POINT _LIBCPP_EXPORTED_FROM_ABI to_chars_result
to_chars(char* __first, char* __last, long double __value, chars_format __fmt, int __precision);
#endif // _LIBCPP_STD_VER >= 17
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_STD_VER >= 17
#endif // _LIBCPP___CHARCONV_TO_CHARS_FLOATING_POINT_H

View File

@ -31,6 +31,7 @@
# endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
# if _LIBCPP_STD_VER >= 20
@ -128,6 +129,7 @@ template <class _Duration>
# endif // _LIBCPP_STD_VER >= 20
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_HAS_EXPERIMENTAL_TZDB

View File

@ -46,6 +46,7 @@ _LIBCPP_END_NAMESPACE_STD
#ifndef _LIBCPP_CXX03_LANG
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
struct _FilesystemClock {
# if _LIBCPP_HAS_INT128
typedef __int128_t rep;
@ -74,6 +75,7 @@ struct _FilesystemClock {
}
# endif // _LIBCPP_STD_VER >= 20
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // !_LIBCPP_CXX03_LANG

View File

@ -19,6 +19,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace chrono {
@ -37,6 +38,7 @@ public:
} // namespace chrono
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___CHRONO_STEADY_CLOCK_H

View File

@ -20,6 +20,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace chrono {
@ -47,6 +48,7 @@ using sys_days = sys_time<days>;
} // namespace chrono
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___CHRONO_SYSTEM_CLOCK_H

View File

@ -32,6 +32,7 @@ _LIBCPP_PUSH_MACROS
#include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#if _LIBCPP_HAS_THREADS
@ -225,6 +226,7 @@ inline void condition_variable::__do_timed_wait(unique_lock<mutex>& __lk,
#endif // _LIBCPP_HAS_THREADS
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -149,8 +149,8 @@ _LIBCPP_HARDENING_MODE_DEBUG
// } HARDENING
# define _LIBCPP_TOSTRING2(x) #x
# define _LIBCPP_TOSTRING(x) _LIBCPP_TOSTRING2(x)
# define _LIBCPP_TOSTRING2(...) #__VA_ARGS__
# define _LIBCPP_TOSTRING(...) _LIBCPP_TOSTRING2(__VA_ARGS__)
// NOLINTNEXTLINE(libcpp-cpp-version-check)
# if __cplusplus < 201103L
@ -406,7 +406,7 @@ typedef __char32_t char32_t;
# endif
# if !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS) && __has_attribute(__type_visibility__)
# define _LIBCPP_NAMESPACE_VISIBILITY __attribute__((__type_visibility__("default")))
# define _LIBCPP_NAMESPACE_VISIBILITY __attribute__((__visibility__("hidden"), __type_visibility__("default")))
# elif !defined(_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS)
# define _LIBCPP_NAMESPACE_VISIBILITY __attribute__((__visibility__("default")))
# else
@ -559,6 +559,15 @@ typedef __char32_t char32_t;
# endif
// clang-format off
# define _LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS \
_LIBCPP_DIAGNOSTIC_PUSH \
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wpragma-clang-attribute") \
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wignored-attributes") \
_Pragma(_LIBCPP_TOSTRING(clang attribute _LibcxxExplicitABIAnnotations.push(__attribute__(( \
__exclude_from_explicit_instantiation__, __abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE)))), \
apply_to = function))) \
_LIBCPP_DIAGNOSTIC_POP
# define _LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS _Pragma("clang attribute _LibcxxExplicitABIAnnotations.pop")
// The unversioned namespace is used when we want to be ABI compatible with other standard libraries in some way. There
// are two main categories where that's the case:
@ -569,9 +578,10 @@ typedef __char32_t char32_t;
// If it's not clear whether using the unversioned namespace is the correct thing to do, it's not. The versioned
// namespace (_LIBCPP_BEGIN_NAMESPACE_STD) should almost always be used.
# define _LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD \
_LIBCPP_PUSH_EXTENSION_DIAGNOSTICS namespace _LIBCPP_NAMESPACE_VISIBILITY std {
_LIBCPP_PUSH_EXTENSION_DIAGNOSTICS _LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS namespace _LIBCPP_NAMESPACE_VISIBILITY std {
# define _LIBCPP_END_UNVERSIONED_NAMESPACE_STD } _LIBCPP_POP_EXTENSION_DIAGNOSTICS
# define _LIBCPP_END_UNVERSIONED_NAMESPACE_STD } _LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS \
_LIBCPP_POP_EXTENSION_DIAGNOSTICS
# define _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD inline namespace _LIBCPP_ABI_NAMESPACE {
# define _LIBCPP_END_NAMESPACE_STD } _LIBCPP_END_UNVERSIONED_NAMESPACE_STD

View File

@ -22,6 +22,7 @@
#endif
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#if defined(_LIBCPP_ABI_VCRUNTIME) && (!defined(_HAS_EXCEPTIONS) || _HAS_EXCEPTIONS != 0)
// The std::exception class was already included above, but we're explicit about this condition here for clarity.
@ -89,6 +90,7 @@ public:
};
#endif // !_LIBCPP_ABI_VCRUNTIME
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
#endif // _LIBCPP___EXCEPTION_EXCEPTION_H

View File

@ -53,6 +53,7 @@ _LIBCPP_OVERRIDABLE_FUNC_VIS __cxa_exception* __cxa_init_primary_exception(
#endif
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#ifndef _LIBCPP_ABI_MICROSOFT
@ -173,6 +174,8 @@ _LIBCPP_HIDE_FROM_ABI exception_ptr make_exception_ptr(_Ep __e) _NOEXCEPT {
}
#endif // _LIBCPP_ABI_MICROSOFT
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
#endif // _LIBCPP___EXCEPTION_EXCEPTION_PTR_H

View File

@ -29,6 +29,7 @@
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI nested_exception {
exception_ptr __ptr_;
@ -42,6 +43,7 @@ public:
[[__noreturn__]] void rethrow_nested() const;
_LIBCPP_HIDE_FROM_ABI exception_ptr nested_ptr() const _NOEXCEPT { return __ptr_; }
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _Tp>
struct __nested : public _Tp, public nested_exception {

View File

@ -16,6 +16,7 @@
#endif
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#if _LIBCPP_STD_VER <= 14 || defined(_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS) || \
defined(_LIBCPP_BUILDING_LIBRARY)
using unexpected_handler = void (*)();
@ -37,6 +38,7 @@ class _LIBCPP_EXPORTED_FROM_ABI exception_ptr;
_LIBCPP_EXPORTED_FROM_ABI exception_ptr current_exception() _NOEXCEPT;
[[__noreturn__]] _LIBCPP_EXPORTED_FROM_ABI void rethrow_exception(exception_ptr);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
#endif // _LIBCPP___EXCEPTION_OPERATIONS_H

View File

@ -16,7 +16,9 @@
#endif
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
[[__noreturn__]] _LIBCPP_EXPORTED_FROM_ABI void terminate() _NOEXCEPT;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
#endif // _LIBCPP___EXCEPTION_TERMINATE_H

View File

@ -31,6 +31,7 @@ _LIBCPP_DIAGNOSTIC_PUSH
# if !_LIBCPP_AVAILABILITY_HAS_BAD_EXPECTED_ACCESS_KEY_FUNCTION
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
# endif
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <>
class _LIBCPP_EXPORTED_FROM_ABI bad_expected_access<void> : public exception {
protected:
@ -48,6 +49,7 @@ public:
_LIBCPP_HIDE_FROM_ABI_VIRTUAL const char* what() const noexcept override { return "bad access to std::expected"; }
# endif
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_DIAGNOSTIC_POP
template <class _Err>

View File

@ -39,6 +39,7 @@ _LIBCPP_PUSH_MACROS
#if _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
@ -461,6 +462,7 @@ private:
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM

View File

@ -33,6 +33,7 @@ _LIBCPP_PUSH_MACROS
#if _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
@ -129,6 +130,7 @@ inline _LIBCPP_HIDE_FROM_ABI directory_iterator end(directory_iterator) noexcept
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM
# if _LIBCPP_STD_VER >= 20

View File

@ -26,6 +26,7 @@
#if _LIBCPP_STD_VER >= 17
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY _LIBCPP_EXPORTED_FROM_ABI filesystem_error : public system_error {
public:
@ -81,6 +82,7 @@ __throw_filesystem_error(_Args&&...) {
}
# endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_STD_VER >= 17

View File

@ -33,6 +33,7 @@ _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_EXPORTED_FROM_ABI path __absolute(const path&, error_code* __ec = nullptr);
_LIBCPP_EXPORTED_FROM_ABI path __canonical(const path&, error_code* __ec = nullptr);
_LIBCPP_EXPORTED_FROM_ABI bool
@ -69,6 +70,7 @@ _LIBCPP_EXPORTED_FROM_ABI path __temp_directory_path(error_code* __ec = nullptr)
_LIBCPP_EXPORTED_FROM_ABI bool __fs_is_empty(const path& __p, error_code* __ec = nullptr);
_LIBCPP_EXPORTED_FROM_ABI void __permissions(const path&, perms, perm_options, error_code* = nullptr);
_LIBCPP_EXPORTED_FROM_ABI space_info __space(const path&, error_code* __ec = nullptr);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p) { return __absolute(__p); }
inline _LIBCPP_HIDE_FROM_ABI path absolute(const path& __p, error_code& __ec) { return __absolute(__p, &__ec); }

View File

@ -42,6 +42,7 @@ _LIBCPP_PUSH_MACROS
#if _LIBCPP_STD_VER >= 17
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
@ -913,6 +914,7 @@ _LIBCPP_EXPORTED_FROM_ABI size_t hash_value(const path& __p) noexcept;
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_NAMESPACE_STD

View File

@ -22,6 +22,7 @@
#if _LIBCPP_STD_VER >= 17
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI path::iterator {
public:
@ -105,6 +106,7 @@ inline _LIBCPP_HIDE_FROM_ABI bool operator!=(const path::iterator& __lhs, const
return !(__lhs == __rhs);
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM
#endif // _LIBCPP_STD_VER >= 17

View File

@ -32,6 +32,7 @@ _LIBCPP_PUSH_MACROS
#if _LIBCPP_STD_VER >= 17 && _LIBCPP_HAS_FILESYSTEM
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_PUSH
@ -142,6 +143,7 @@ inline _LIBCPP_HIDE_FROM_ABI recursive_directory_iterator end(recursive_director
_LIBCPP_AVAILABILITY_FILESYSTEM_LIBRARY_POP
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM
# if _LIBCPP_STD_VER >= 20

View File

@ -22,6 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
#if _LIBCPP_STD_VER >= 20
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
class _LIBCPP_EXPORTED_FROM_ABI format_error : public runtime_error {
@ -34,6 +35,7 @@ public:
~format_error() noexcept override = default;
};
_LIBCPP_DIAGNOSTIC_POP
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
[[noreturn]] inline _LIBCPP_HIDE_FROM_ABI void __throw_format_error(const char* __s) {
# if _LIBCPP_HAS_EXCEPTIONS

View File

@ -57,6 +57,7 @@ _LIBCPP_DIAGNOSTIC_PUSH
# if !_LIBCPP_AVAILABILITY_HAS_BAD_FUNCTION_CALL_KEY_FUNCTION
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wweak-vtables")
# endif
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI bad_function_call : public exception {
public:
_LIBCPP_HIDE_FROM_ABI bad_function_call() _NOEXCEPT = default;
@ -75,6 +76,7 @@ public:
const char* what() const _NOEXCEPT override;
# endif
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_DIAGNOSTIC_POP
[[__noreturn__]] inline _LIBCPP_HIDE_FROM_ABI void __throw_bad_function_call() {
@ -236,6 +238,7 @@ public:
template <class _Fp>
class __base;
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _Rp, class... _ArgTypes>
class __base<_Rp(_ArgTypes...)> {
public:
@ -335,6 +338,8 @@ const std::type_info& __func<_Fp, _Alloc, _Rp(_ArgTypes...)>::target_type() cons
# endif // _LIBCPP_HAS_RTTI
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
// __value_func creates a value-type from a __func.
template <class _Fp>

View File

@ -239,7 +239,9 @@ private:
};
#if _LIBCPP_AVAILABILITY_HAS_HASH_MEMORY
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
[[__gnu__::__pure__]] _LIBCPP_EXPORTED_FROM_ABI size_t __hash_memory(_LIBCPP_NOESCAPE const void*, size_t) _NOEXCEPT;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
#else
_LIBCPP_HIDE_FROM_ABI inline size_t __hash_memory(const void* __ptr, size_t __size) _NOEXCEPT {
return __murmur2_or_cityhash<size_t>()(__ptr, __size);

View File

@ -70,7 +70,9 @@ struct __is_hash_value_type : false_type {};
template <class _One>
struct __is_hash_value_type<_One> : __is_hash_value_type_imp<__remove_cvref_t<_One> > {};
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_EXPORTED_FROM_ABI size_t __next_prime(size_t __n);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _NodePtr>
struct __hash_node_base {

View File

@ -42,6 +42,7 @@
# endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI locale;
@ -1513,6 +1514,7 @@ private:
};
# endif // _LIBCPP_HAS_WIDE_CHARACTERS
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_HAS_LOCALIZATION

View File

@ -17,9 +17,11 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_EXPORTED_FROM_ABI void* align(size_t __align, size_t __sz, void*& __ptr, size_t& __space);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___MEMORY_ALIGN_H

View File

@ -68,6 +68,7 @@ inline _LIBCPP_HIDE_FROM_ABI _Tp __libcpp_atomic_refcount_decrement(_Tp& __t) _N
#endif
}
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI __shared_count {
__shared_count(const __shared_count&);
__shared_count& operator=(const __shared_count&);
@ -131,6 +132,7 @@ public:
private:
virtual void __on_zero_shared_weak() _NOEXCEPT = 0;
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -72,6 +72,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI bad_weak_ptr : public std::exception {
public:
_LIBCPP_HIDE_FROM_ABI bad_weak_ptr() _NOEXCEPT = default;
@ -80,6 +81,7 @@ public:
~bad_weak_ptr() _NOEXCEPT override;
const char* what() const _NOEXCEPT override;
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
[[__noreturn__]] inline _LIBCPP_HIDE_FROM_ABI void __throw_bad_weak_ptr() {
#if _LIBCPP_HAS_EXCEPTIONS
@ -92,6 +94,7 @@ public:
template <class _Tp>
class weak_ptr;
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _Tp, class _Dp, class _Alloc>
class __shared_ptr_pointer : public __shared_weak_count {
_LIBCPP_COMPRESSED_TRIPLE(_Tp, __ptr_, _Dp, __deleter_, _Alloc, __alloc_);
@ -215,6 +218,7 @@ private:
_Storage __storage_;
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
struct __shared_ptr_dummy_rebind_allocator_type;
template <>
@ -770,6 +774,7 @@ struct __sp_aligned_storage {
template <class _Tp, class _Alloc>
struct __unbounded_array_control_block;
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _Tp, class _Alloc>
struct __unbounded_array_control_block<_Tp[], _Alloc> : __shared_weak_count {
_LIBCPP_HIDE_FROM_ABI constexpr _Tp* __get_data() noexcept { return __data_; }
@ -848,6 +853,7 @@ private:
_Tp __data_[1];
};
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _Array, class _Alloc, class... _Arg>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Array>
@ -870,6 +876,7 @@ __allocate_shared_unbounded_array(const _Alloc& __a, size_t __n, _Arg&&... __arg
template <class _Tp, class _Alloc>
struct __bounded_array_control_block;
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _Tp, size_t _Count, class _Alloc>
struct __bounded_array_control_block<_Tp[_Count], _Alloc> : __shared_weak_count {
_LIBCPP_HIDE_FROM_ABI constexpr _Tp* __get_data() noexcept { return __data_; }
@ -926,6 +933,7 @@ private:
_Tp __data_[_Count];
};
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _Array, class _Alloc, class... _Arg>
_LIBCPP_HIDE_FROM_ABI shared_ptr<_Array> __allocate_shared_bounded_array(const _Alloc& __a, _Arg&&... __arg) {
@ -1479,6 +1487,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, shared_ptr<_Yp> const& __p);
#if _LIBCPP_HAS_THREADS
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI __sp_mut {
void* __lx_;
@ -1495,6 +1504,7 @@ private:
};
_LIBCPP_EXPORTED_FROM_ABI __sp_mut& __get_sp_mut(const void*);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _Tp>
inline _LIBCPP_HIDE_FROM_ABI bool atomic_is_lock_free(const shared_ptr<_Tp>*) {

View File

@ -21,6 +21,7 @@
#if _LIBCPP_STD_VER >= 17
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace pmr {
@ -82,6 +83,7 @@ null_memory_resource() noexcept;
} // namespace pmr
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_STD_VER >= 17

View File

@ -21,6 +21,7 @@
#if _LIBCPP_STD_VER >= 17
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace pmr {
@ -112,6 +113,7 @@ private:
} // namespace pmr
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_STD_VER >= 17

View File

@ -24,6 +24,7 @@
#if _LIBCPP_STD_VER >= 17
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace pmr {
@ -86,6 +87,7 @@ private:
} // namespace pmr
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_STD_VER >= 17

View File

@ -22,6 +22,7 @@
#if _LIBCPP_STD_VER >= 17
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace pmr {
@ -99,6 +100,7 @@ private:
} // namespace pmr
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_STD_VER >= 17

View File

@ -20,6 +20,7 @@
#if _LIBCPP_HAS_THREADS
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_THREAD_SAFETY_ANNOTATION(capability("mutex")) mutex {
__libcpp_mutex_t __m_ = _LIBCPP_MUTEX_INITIALIZER;
@ -46,6 +47,7 @@ public:
static_assert(is_nothrow_default_constructible<mutex>::value, "the default constructor for std::mutex must be nothrow");
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP_HAS_THREADS

View File

@ -119,7 +119,9 @@ void _LIBCPP_HIDE_FROM_ABI __call_once_proxy(void* __vp) {
(*__p)();
}
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_EXPORTED_FROM_ABI void __call_once(volatile once_flag::_State_type&, void*, void (*)(void*));
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
#ifndef _LIBCPP_CXX03_LANG

View File

@ -18,6 +18,7 @@
#endif
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#if !defined(_LIBCPP_ABI_VCRUNTIME)
class _LIBCPP_EXPORTED_FROM_ABI bad_alloc : public exception {
@ -68,6 +69,7 @@ public:
_LIBCPP_VERBOSE_ABORT("bad_array_new_length was thrown in -fno-exceptions mode");
#endif
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
#endif // _LIBCPP___NEW_EXCEPTIONS_H

View File

@ -19,9 +19,11 @@
# include <new.h>
#else
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
typedef void (*new_handler)();
_LIBCPP_EXPORTED_FROM_ABI new_handler set_new_handler(new_handler) _NOEXCEPT;
_LIBCPP_EXPORTED_FROM_ABI new_handler get_new_handler() _NOEXCEPT;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
#endif // _LIBCPP_ABI_VCRUNTIME

View File

@ -39,6 +39,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _CharT, class _Traits>
class basic_ostream : virtual public basic_ios<_CharT, _Traits> {
@ -670,6 +671,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostream<wchar_t>;
# endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -82,7 +82,9 @@ _LIBCPP_HIDE_FROM_ABI inline void vprint_nonunicode(ostream& __os, string_view _
// native Unicode API;
// Whether the returned FILE* is "a terminal capable of displaying Unicode"
// is determined in the same way as the print(FILE*, ...) overloads.
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_EXPORTED_FROM_ABI FILE* __get_ostream_file(ostream& __os);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
# if _LIBCPP_HAS_UNICODE
template <class = void> // TODO PRINT template or availability markup fires too eagerly (http://llvm.org/PR61563).

View File

@ -51,11 +51,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD
namespace __pstl {
namespace __libdispatch {
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
// ::dispatch_apply is marked as __attribute__((nothrow)) because it doesn't let exceptions propagate, and neither do
// we.
// TODO: Do we want to add [[_Clang::__callback__(__func, __context, __)]]?
_LIBCPP_EXPORTED_FROM_ABI void
__dispatch_apply(size_t __chunk_count, void* __context, void (*__func)(void* __context, size_t __chunk)) noexcept;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _Func>
_LIBCPP_HIDE_FROM_ABI void __dispatch_apply(size_t __chunk_count, _Func __func) noexcept {
@ -70,7 +72,9 @@ struct __chunk_partitions {
ptrdiff_t __first_chunk_size_;
};
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
[[__gnu__::__const__]] _LIBCPP_EXPORTED_FROM_ABI __chunk_partitions __partition_chunks(ptrdiff_t __size) noexcept;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _RandomAccessIterator, class _Functor>
_LIBCPP_HIDE_FROM_ABI optional<__empty>

View File

@ -99,7 +99,9 @@ public:
// The LLVM C library provides this with conflicting `noexcept` attributes.
#if !defined(_LIBCPP_MSVCRT_LIKE) && !defined(__LLVM_LIBC__)
extern "C" double lgamma_r(double, int*);
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_EXPORTED_FROM_ABI extern "C" double lgamma_r(double, int*);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
#endif
inline _LIBCPP_HIDE_FROM_ABI double __libcpp_lgamma(double __d) {

View File

@ -20,6 +20,7 @@ _LIBCPP_PUSH_MACROS
#include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#if _LIBCPP_HAS_RANDOM_DEVICE
@ -74,6 +75,7 @@ public:
#endif // _LIBCPP_HAS_RANDOM_DEVICE
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -25,6 +25,7 @@ class _LIBCPP_EXPORTED_FROM_ABI error_code;
class _LIBCPP_HIDDEN __do_message;
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI error_category {
public:
virtual ~error_category() _NOEXCEPT;
@ -69,6 +70,7 @@ public:
[[__gnu__::__const__]] _LIBCPP_EXPORTED_FROM_ABI const error_category& generic_category() _NOEXCEPT;
[[__gnu__::__const__]] _LIBCPP_EXPORTED_FROM_ABI const error_category& system_category() _NOEXCEPT;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -39,6 +39,7 @@ namespace __adl_only {
void make_error_code() = delete;
} // namespace __adl_only
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI error_code {
int __val_;
const error_category* __cat_;
@ -83,6 +84,7 @@ public:
_LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return __val_ != 0; }
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
inline _LIBCPP_HIDE_FROM_ABI error_code make_error_code(errc __e) _NOEXCEPT {
return error_code(static_cast<int>(__e), generic_category());

View File

@ -46,6 +46,7 @@ namespace __adl_only {
void make_error_condition() = delete;
} // namespace __adl_only
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI error_condition {
int __val_;
const error_category* __cat_;
@ -87,6 +88,7 @@ public:
_LIBCPP_HIDE_FROM_ABI explicit operator bool() const _NOEXCEPT { return __val_ != 0; }
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
inline _LIBCPP_HIDE_FROM_ABI error_condition make_error_condition(errc __e) _NOEXCEPT {
return error_condition(static_cast<int>(__e), generic_category());

View File

@ -22,6 +22,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI system_error : public runtime_error {
error_code __ec_;
@ -52,6 +53,7 @@ public:
#endif
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___SYSTEM_ERROR_SYSTEM_ERROR_H

View File

@ -18,7 +18,9 @@
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
[[__noreturn__]] _LIBCPP_EXPORTED_FROM_ABI void __throw_system_error(int __ev, const char* __what_arg);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -32,7 +32,9 @@ namespace this_thread {
#if _LIBCPP_HAS_THREADS
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_EXPORTED_FROM_ABI void sleep_for(const chrono::nanoseconds& __ns);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _Rep, class _Period>
_LIBCPP_HIDE_FROM_ABI void sleep_for(const chrono::duration<_Rep, _Period>& __d) {

View File

@ -42,6 +42,7 @@ _LIBCPP_PUSH_MACROS
#include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#if _LIBCPP_HAS_THREADS
@ -256,6 +257,7 @@ inline _LIBCPP_HIDE_FROM_ABI void swap(thread& __x, thread& __y) _NOEXCEPT { __x
#endif // _LIBCPP_HAS_THREADS
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -20,8 +20,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD
// This function should never be called directly from the code -- it should only be called through
// the _LIBCPP_VERBOSE_ABORT macro.
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
[[__noreturn__]] _LIBCPP_AVAILABILITY_VERBOSE_ABORT _LIBCPP_OVERRIDABLE_FUNC_VIS _LIBCPP_ATTRIBUTE_FORMAT(
__printf__, 1, 2) void __libcpp_verbose_abort(const char* __format, ...) _NOEXCEPT;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
// _LIBCPP_VERBOSE_ABORT(format, args...)
//

View File

@ -120,10 +120,12 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast {
public:
const char* what() const _NOEXCEPT override;
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_NAMESPACE_STD

View File

@ -97,6 +97,7 @@ using __barrier_phase_t _LIBCPP_NODEBUG = uint8_t;
class __barrier_algorithm_base;
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __barrier_algorithm_base*
__construct_barrier_algorithm_base(ptrdiff_t& __expected);
@ -105,6 +106,7 @@ __arrive_barrier_algorithm_base(__barrier_algorithm_base* __barrier, __barrier_p
_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void
__destroy_barrier_algorithm_base(__barrier_algorithm_base* __barrier) noexcept;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _CompletionF>
class __barrier_base {

View File

@ -71,6 +71,7 @@ class codecvt_utf8_utf16
# if _LIBCPP_STD_VER < 26 || defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT)
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
enum _LIBCPP_DEPRECATED_IN_CXX17 codecvt_mode { consume_header = 4, generate_header = 2, little_endian = 1 };
@ -579,6 +580,7 @@ public:
};
_LIBCPP_SUPPRESS_DEPRECATED_POP
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_BUILDING_LIBRARY) || defined(_LIBCPP_ENABLE_CXX26_REMOVED_CODECVT)

View File

@ -340,7 +340,9 @@ bool condition_variable_any::wait_for(
# endif // _LIBCPP_STD_VER >= 20
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_EXPORTED_FROM_ABI void notify_all_at_thread_exit(condition_variable&, unique_lock<mutex>);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -220,6 +220,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
# if _LIBCPP_STD_VER >= 26 && defined(_LIBCPP_WIN32API)
_LIBCPP_EXPORTED_FROM_ABI void* __filebuf_windows_native_handle(FILE* __file) noexcept;
@ -1569,6 +1570,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ofstream<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_filebuf<char>;
# endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -420,6 +420,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
// enum class future_errc
_LIBCPP_DECLARE_STRONG_ENUM(future_errc){
@ -2061,6 +2062,7 @@ inline shared_future<_Rp&> future<_Rp&>::share() _NOEXCEPT {
inline shared_future<void> future<void>::share() _NOEXCEPT { return shared_future<void>(std::move(*this)); }
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -247,6 +247,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
typedef ptrdiff_t streamsize;
@ -871,6 +872,7 @@ _LIBCPP_HIDE_FROM_ABI inline ios_base& defaultfloat(ios_base& __str) {
return __str;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -187,6 +187,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _CharT, class _Traits>
class basic_istream : virtual public basic_ios<_CharT, _Traits> {
@ -1369,6 +1370,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istream<wchar_t>;
# endif
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_iostream<char>;
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -246,6 +246,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
# if defined(__APPLE__) || defined(__FreeBSD__)
# define _LIBCPP_GET_C_LOCALE 0
@ -3678,6 +3679,7 @@ _LIBCPP_SUPPRESS_DEPRECATED_POP
# endif // _LIBCPP_STD_VER < 26 || defined(_LIBCPP_ENABLE_CXX26_REMOVED_WSTRING_CONVERT)
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -215,6 +215,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
# if _LIBCPP_HAS_THREADS
@ -491,6 +492,7 @@ _LIBCPP_CTAD_SUPPORTED_FOR_TYPE(scoped_lock);
# endif // _LIBCPP_STD_VER >= 17
# endif // _LIBCPP_HAS_THREADS
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -54,6 +54,7 @@ namespace std {
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
# ifdef _LIBCPP_WIN32API
_LIBCPP_EXPORTED_FROM_ABI bool __is_windows_terminal(FILE* __stream);
@ -72,6 +73,7 @@ _LIBCPP_EXPORTED_FROM_ABI void __write_to_windows_console(FILE* __stream, wstrin
# elif __has_include(<unistd.h>)
_LIBCPP_EXPORTED_FROM_ABI bool __is_posix_terminal(FILE* __stream);
# endif // _LIBCPP_WIN32API
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
# if _LIBCPP_STD_VER >= 23

View File

@ -840,6 +840,7 @@ _LIBCPP_PUSH_MACROS
# define _LIBCPP_REGEX_COMPLEXITY_FACTOR 4096
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace regex_constants {
@ -5805,6 +5806,7 @@ regex_replace(const _CharT* __s,
return __r;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
# if _LIBCPP_STD_VER >= 17

View File

@ -153,6 +153,7 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
struct _LIBCPP_EXPORTED_FROM_ABI __shared_mutex_base {
mutex __mut_;
condition_variable __gate1_;
@ -181,6 +182,7 @@ struct _LIBCPP_EXPORTED_FROM_ABI __shared_mutex_base {
// typedef implementation-defined native_handle_type; // See 30.2.3
// native_handle_type native_handle(); // See 30.2.3
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
# if _LIBCPP_STD_VER >= 17
class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_THREAD_SAFETY_ANNOTATION(__capability__("shared_mutex")) shared_mutex {
@ -221,6 +223,7 @@ public:
};
# endif
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI
_LIBCPP_THREAD_SAFETY_ANNOTATION(__capability__("shared_timed_mutex")) shared_timed_mutex {
__shared_mutex_base __base_;
@ -304,6 +307,7 @@ public:
void unlock_shared() _LIBCPP_THREAD_SAFETY_ANNOTATION(__release_shared_capability__());
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
template <class _Mutex>
class shared_lock {

View File

@ -338,6 +338,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
// Class template basic_stringbuf [stringbuf]
@ -1282,6 +1283,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_ostringstream<char>
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_istringstream<char>;
# endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -212,7 +212,9 @@ public:
_LIBCPP_BEGIN_NAMESPACE_STD
// in the dylib
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
[[__noreturn__]] _LIBCPP_EXPORTED_FROM_ABI void __throw_runtime_error(const char*);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
[[__noreturn__]] inline _LIBCPP_HIDE_FROM_ABI void __throw_logic_error(const char* __msg) {
# if _LIBCPP_HAS_EXCEPTIONS

View File

@ -132,6 +132,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _CharT, class _Traits>
class basic_streambuf {
@ -378,6 +379,7 @@ extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>;
extern template class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>;
# endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -690,6 +690,7 @@ _LIBCPP_PUSH_MACROS
# endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
// basic_string
@ -4008,6 +4009,7 @@ inline constexpr bool __format::__enable_insertable<std::basic_string<wchar_t>>
# endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -151,6 +151,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_DEPRECATED _LIBCPP_EXPORTED_FROM_ABI strstreambuf : public streambuf {
public:
@ -348,6 +349,7 @@ public:
private:
strstreambuf __sb_; // exposition only
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -380,6 +380,7 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class _Tp>
class valarray;
@ -3355,6 +3356,7 @@ inline _LIBCPP_HIDE_FROM_ABI const _Tp* end(const valarray<_Tp>& __v) {
return __v.__end_;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -285,12 +285,12 @@ _LIBCPP_PUSH_MACROS
# include <__undef_macros>
_LIBCPP_BEGIN_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_VARIANT_ACCESS bad_variant_access : public exception {
public:
const char* what() const _NOEXCEPT override;
};
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_UNVERSIONED_NAMESPACE_STD
_LIBCPP_BEGIN_NAMESPACE_STD

View File

@ -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

View File

@ -17,6 +17,7 @@ const char* bad_any_cast::what() const noexcept { return "bad any cast"; }
// Preserve std::experimental::any_bad_cast for ABI compatibility
// Even though it no longer exists in a header file
_LIBCPP_BEGIN_NAMESPACE_LFTS
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_EXPORTED_FROM_ABI _LIBCPP_AVAILABILITY_BAD_ANY_CAST bad_any_cast : public bad_cast {
public:
@ -25,4 +26,5 @@ public:
const char* bad_any_cast::what() const noexcept { return "bad any cast"; }
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_LFTS

View File

@ -50,6 +50,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#ifdef __linux__
@ -204,4 +205,5 @@ __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile* __location, __cxx
__libcpp_contention_wait(&__libcpp_contention_state(__location)->__contention_state, __location, __old_value);
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -10,6 +10,7 @@
#include <thread>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class __barrier_algorithm_base {
public:
@ -68,4 +69,5 @@ _LIBCPP_EXPORTED_FROM_ABI void __destroy_barrier_algorithm_base(__barrier_algori
delete __barrier;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -17,6 +17,7 @@
#include "include/atomic_support.h"
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
// If dispatch_once_f ever handles C++ exceptions, and if one can get to it
// without illegal macros (unexpected macros not beginning with _UpperCase or
@ -68,4 +69,5 @@ void __call_once(volatile once_flag::_State_type& flag, void* arg, void (*func)(
#endif // !_LIBCPP_HAS_THREADS
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -13,6 +13,7 @@
#include "include/to_chars_floating_point.h"
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#ifndef _LIBCPP_ABI_DO_NOT_EXPORT_TO_CHARS_BASE_10
@ -86,4 +87,6 @@ template __from_chars_result<float> __from_chars_floating_point(
template __from_chars_result<double> __from_chars_floating_point(
_LIBCPP_NOESCAPE const char* __first, _LIBCPP_NOESCAPE const char* __last, chars_format __fmt);
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -64,6 +64,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace chrono {
@ -262,4 +263,5 @@ steady_clock::time_point steady_clock::now() noexcept { return __libcpp_steady_c
} // namespace chrono
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -23,6 +23,7 @@ _LIBCPP_PUSH_MACROS
#include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
// ~condition_variable is defined elsewhere.
@ -72,6 +73,7 @@ void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
__thread_local_data()->notify_all_at_thread_exit(&cond, lk.release());
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -19,6 +19,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#ifdef NEEDS_CONDVAR_DESTRUCTOR
@ -37,4 +38,5 @@ public:
condition_variable::~condition_variable() { __libcpp_condvar_destroy(&__cv_); }
#endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -15,6 +15,7 @@
#include <system_error>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
// class error_category
@ -34,4 +35,5 @@ bool error_category::equivalent(const error_code& code, int condition) const noe
return *this == code.category() && code.value() == condition;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -9,5 +9,9 @@
#include <expected>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
const char* bad_expected_access<void>::what() const noexcept { return "bad access to std::expected"; }
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -9,6 +9,7 @@
#include <chrono>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace chrono {
@ -19,4 +20,5 @@ _LIBCPP_EXPORTED_FROM_ABI ambiguous_local_time::~ambiguous_local_time() = defaul
} // namespace chrono
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -16,6 +16,7 @@
#include "time_utils.h"
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
error_code directory_entry::__do_refresh() noexcept {
__data_.__reset();
@ -70,4 +71,5 @@ error_code directory_entry::__do_refresh() noexcept {
return failure_ec;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM

View File

@ -26,6 +26,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
using detail::ErrorHandler;
@ -320,4 +321,5 @@ bool recursive_directory_iterator::__try_recursion(error_code* ec) {
return false;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM

View File

@ -42,6 +42,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_DIAGNOSTIC_PUSH
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wdeprecated")
@ -76,4 +77,5 @@ _FilesystemClock::time_point _FilesystemClock::now() noexcept {
#endif
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM

View File

@ -15,6 +15,7 @@
#include "format_string.h"
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
filesystem_error::~filesystem_error() {}
@ -37,4 +38,5 @@ void filesystem_error::__create_what(int __num_paths) {
}();
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM

View File

@ -76,6 +76,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
using detail::capture_errno;
using detail::ErrorHandler;
@ -1084,4 +1085,5 @@ path __weakly_canonical(const path& p, error_code* ec) {
return result.lexically_normal();
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM

View File

@ -14,6 +14,7 @@
#include "path_parser.h"
_LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
using detail::ErrorHandler;
using parser::createView;
@ -442,4 +443,5 @@ size_t __char_to_wide(const string& str, wchar_t* out, size_t outlen) {
}
#endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_FILESYSTEM

View File

@ -18,6 +18,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
#if defined(_LIBCPP_WIN32API)
@ -34,4 +35,5 @@ _LIBCPP_EXPORTED_FROM_ABI void* __filebuf_windows_native_handle(FILE* __file) no
#endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -9,6 +9,7 @@
#include <functional>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
bad_function_call::~bad_function_call() noexcept {}
@ -18,4 +19,5 @@ size_t __hash_memory(_LIBCPP_NOESCAPE const void* ptr, size_t size) noexcept {
return __murmur2_or_cityhash<size_t>()(ptr, size);
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -10,6 +10,7 @@
#include <string>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_HIDDEN __future_error_category : public __do_message {
public:
@ -194,4 +195,5 @@ shared_future<void>& shared_future<void>::operator=(const shared_future& __rhs)
return *this;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -14,6 +14,7 @@
_LIBCPP_CLANG_DIAGNOSTIC_IGNORED("-Wtautological-constant-out-of-range-compare")
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace {
@ -449,4 +450,5 @@ size_t __next_prime(size_t n) {
}
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -22,6 +22,7 @@ _LIBCPP_PUSH_MACROS
#include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
class _LIBCPP_HIDDEN __iostream_category : public __do_message {
public:
@ -382,6 +383,7 @@ bool ios_base::sync_with_stdio(bool sync) {
return r;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -15,6 +15,7 @@
#define ABI_NAMESPACE_STR _LIBCPP_TOSTRING(_LIBCPP_ABI_NAMESPACE)
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
template <class StreamT, class BufferT>
union stream_data {
@ -135,4 +136,5 @@ ios_base::Init::Init() {
ios_base::Init::~Init() {}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -49,6 +49,7 @@ _LIBCPP_PUSH_MACROS
#include <__undef_macros>
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
struct __libcpp_unique_locale {
__libcpp_unique_locale(const char* nm) : __loc_(__locale::__newlocale(_LIBCPP_ALL_MASK, nm, 0)) {}
@ -5727,6 +5728,7 @@ template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char16_t,
template class _LIBCPP_CLASS_TEMPLATE_INSTANTIATION_VIS codecvt_byname<char32_t, char8_t, mbstate_t>;
#endif
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD
_LIBCPP_POP_MACROS

View File

@ -26,6 +26,7 @@
#include "include/atomic_support.h"
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
bad_weak_ptr::~bad_weak_ptr() noexcept {}
@ -147,4 +148,5 @@ void* align(size_t alignment, size_t size, void*& ptr, size_t& space) {
return r;
}
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

View File

@ -20,6 +20,7 @@
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
_LIBCPP_BEGIN_EXPLICIT_ABI_ANNOTATIONS
namespace pmr {
@ -497,4 +498,5 @@ void* monotonic_buffer_resource::do_allocate(size_t bytes, size_t align) {
} // namespace pmr
_LIBCPP_END_EXPLICIT_ABI_ANNOTATIONS
_LIBCPP_END_NAMESPACE_STD

Some files were not shown because too many files have changed in this diff Show More