| author | |
| committer | |
| log | d0a5ad0e4c74d36982dbc823dd80dc62395fe2bd |
| tree | 416985f5a105d9b20c7fbb4b5084649454b02bcc |
| parent | fd10baf748aeb3b6d2394701d735098e64638a22 |
6 files changed, 45 insertions(+), 56 deletions(-)
lib/libcxx/include/__config+20-13| ... | @@ -20,9 +20,21 @@ | ... | @@ -20,9 +20,21 @@ |
| 20 | # pragma GCC system_header | 20 | # pragma GCC system_header |
| 21 | #endif | 21 | #endif |
| 22 | 22 | ||
| 23 | #if defined(__apple_build_version__) | ||
| 24 | # define _LIBCPP_COMPILER_CLANG_BASED | ||
| 25 | # define _LIBCPP_APPLE_CLANG_VER (__apple_build_version__ / 10000) | ||
| 26 | #elif defined(__clang__) | ||
| 27 | # define _LIBCPP_COMPILER_CLANG_BASED | ||
| 28 | # define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__) | ||
| 29 | #elif defined(__GNUC__) | ||
| 30 | # define _LIBCPP_COMPILER_GCC | ||
| 31 | #elif defined(_MSC_VER) | ||
| 32 | # define _LIBCPP_COMPILER_MSVC | ||
| 33 | #endif | ||
| 34 | |||
| 23 | #ifdef __cplusplus | 35 | #ifdef __cplusplus |
| 24 | 36 | ||
| 25 | # define _LIBCPP_VERSION 15000 | 37 | # define _LIBCPP_VERSION 15003 |
| 26 | 38 | ||
| 27 | # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y | 39 | # define _LIBCPP_CONCAT_IMPL(_X, _Y) _X##_Y |
| 28 | # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) | 40 | # define _LIBCPP_CONCAT(_X, _Y) _LIBCPP_CONCAT_IMPL(_X, _Y) |
| ... | @@ -196,18 +208,6 @@ | ... | @@ -196,18 +208,6 @@ |
| 196 | # define __has_include(...) 0 | 208 | # define __has_include(...) 0 |
| 197 | # endif | 209 | # endif |
| 198 | 210 | ||
| 199 | # if defined(__apple_build_version__) | ||
| 200 | # define _LIBCPP_COMPILER_CLANG_BASED | ||
| 201 | # define _LIBCPP_APPLE_CLANG_VER (__apple_build_version__ / 10000) | ||
| 202 | # elif defined(__clang__) | ||
| 203 | # define _LIBCPP_COMPILER_CLANG_BASED | ||
| 204 | # define _LIBCPP_CLANG_VER (__clang_major__ * 100 + __clang_minor__) | ||
| 205 | # elif defined(__GNUC__) | ||
| 206 | # define _LIBCPP_COMPILER_GCC | ||
| 207 | # elif defined(_MSC_VER) | ||
| 208 | # define _LIBCPP_COMPILER_MSVC | ||
| 209 | # endif | ||
| 210 | |||
| 211 | # if !defined(_LIBCPP_COMPILER_CLANG_BASED) && __cplusplus < 201103L | 211 | # if !defined(_LIBCPP_COMPILER_CLANG_BASED) && __cplusplus < 201103L |
| 212 | # error "libc++ only supports C++03 with Clang-based compilers. Please enable C++11" | 212 | # error "libc++ only supports C++03 with Clang-based compilers. Please enable C++11" |
| 213 | # endif | 213 | # endif |
| ... | @@ -1099,6 +1099,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD | ... | @@ -1099,6 +1099,13 @@ _LIBCPP_BEGIN_NAMESPACE_STD _LIBCPP_END_NAMESPACE_STD |
| 1099 | # define _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION | 1099 | # define _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION |
| 1100 | # endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES | 1100 | # endif // _LIBCPP_ENABLE_CXX17_REMOVED_FEATURES |
| 1101 | 1101 | ||
| 1102 | // Leave the deprecation notices in by default, but don't remove unary_function and | ||
| 1103 | // binary_function entirely just yet. That way, folks will have one release to act | ||
| 1104 | // on the deprecation warnings. | ||
| 1105 | # ifndef _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION | ||
| 1106 | # define _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION | ||
| 1107 | # endif | ||
| 1108 | |||
| 1102 | # if defined(_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES) | 1109 | # if defined(_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES) |
| 1103 | # define _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS | 1110 | # define _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_MEMBERS |
| 1104 | # define _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION | 1111 | # define _LIBCPP_ENABLE_CXX20_REMOVED_ALLOCATOR_VOID_SPECIALIZATION |
lib/libcxx/include/__functional/function.h+12-2| ... | @@ -883,7 +883,7 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)> | ... | @@ -883,7 +883,7 @@ template <class _Rp, class... _ArgTypes> class __policy_func<_Rp(_ArgTypes...)> |
| 883 | #endif // _LIBCPP_NO_RTTI | 883 | #endif // _LIBCPP_NO_RTTI |
| 884 | }; | 884 | }; |
| 885 | 885 | ||
| 886 | #if defined(_LIBCPP_HAS_BLOCKS_RUNTIME) && !defined(_LIBCPP_HAS_OBJC_ARC) | 886 | #if defined(_LIBCPP_HAS_BLOCKS_RUNTIME) |
| 887 | 887 | ||
| 888 | extern "C" void *_Block_copy(const void *); | 888 | extern "C" void *_Block_copy(const void *); |
| 889 | extern "C" void _Block_release(const void *); | 889 | extern "C" void _Block_release(const void *); |
| ... | @@ -898,14 +898,22 @@ class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)> | ... | @@ -898,14 +898,22 @@ class __func<_Rp1(^)(_ArgTypes1...), _Alloc, _Rp(_ArgTypes...)> |
| 898 | public: | 898 | public: |
| 899 | _LIBCPP_INLINE_VISIBILITY | 899 | _LIBCPP_INLINE_VISIBILITY |
| 900 | explicit __func(__block_type const& __f) | 900 | explicit __func(__block_type const& __f) |
| 901 | #ifdef _LIBCPP_HAS_OBJC_ARC | ||
| 902 | : __f_(__f) | ||
| 903 | #else | ||
| 901 | : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr)) | 904 | : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr)) |
| 905 | #endif | ||
| 902 | { } | 906 | { } |
| 903 | 907 | ||
| 904 | // [TODO] add && to save on a retain | 908 | // [TODO] add && to save on a retain |
| 905 | 909 | ||
| 906 | _LIBCPP_INLINE_VISIBILITY | 910 | _LIBCPP_INLINE_VISIBILITY |
| 907 | explicit __func(__block_type __f, const _Alloc& /* unused */) | 911 | explicit __func(__block_type __f, const _Alloc& /* unused */) |
| 912 | #ifdef _LIBCPP_HAS_OBJC_ARC | ||
| 913 | : __f_(__f) | ||
| 914 | #else | ||
| 908 | : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr)) | 915 | : __f_(reinterpret_cast<__block_type>(__f ? _Block_copy(__f) : nullptr)) |
| 916 | #endif | ||
| 909 | { } | 917 | { } |
| 910 | 918 | ||
| 911 | virtual __base<_Rp(_ArgTypes...)>* __clone() const { | 919 | virtual __base<_Rp(_ArgTypes...)>* __clone() const { |
| ... | @@ -921,8 +929,10 @@ public: | ... | @@ -921,8 +929,10 @@ public: |
| 921 | } | 929 | } |
| 922 | 930 | ||
| 923 | virtual void destroy() _NOEXCEPT { | 931 | virtual void destroy() _NOEXCEPT { |
| 932 | #ifndef _LIBCPP_HAS_OBJC_ARC | ||
| 924 | if (__f_) | 933 | if (__f_) |
| 925 | _Block_release(__f_); | 934 | _Block_release(__f_); |
| 935 | #endif | ||
| 926 | __f_ = 0; | 936 | __f_ = 0; |
| 927 | } | 937 | } |
| 928 | 938 | ||
| ... | @@ -950,7 +960,7 @@ public: | ... | @@ -950,7 +960,7 @@ public: |
| 950 | #endif // _LIBCPP_NO_RTTI | 960 | #endif // _LIBCPP_NO_RTTI |
| 951 | }; | 961 | }; |
| 952 | 962 | ||
| 953 | #endif // _LIBCPP_HAS_EXTENSION_BLOCKS && !_LIBCPP_HAS_OBJC_ARC | 963 | #endif // _LIBCPP_HAS_EXTENSION_BLOCKS |
| 954 | 964 | ||
| 955 | } // namespace __function | 965 | } // namespace __function |
| 956 | 966 |
lib/libcxx/include/atomic+9-37| ... | @@ -1113,6 +1113,12 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT | ... | @@ -1113,6 +1113,12 @@ _Tp kill_dependency(_Tp __y) _NOEXCEPT |
| 1113 | # define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE | 1113 | # define ATOMIC_POINTER_LOCK_FREE __GCC_ATOMIC_POINTER_LOCK_FREE |
| 1114 | #endif | 1114 | #endif |
| 1115 | 1115 | ||
| 1116 | template <class _Tp> | ||
| 1117 | struct __libcpp_is_always_lock_free { | ||
| 1118 | // __atomic_always_lock_free is available in all Standard modes | ||
| 1119 | static const bool __value = __atomic_always_lock_free(sizeof(_Tp), 0); | ||
| 1120 | }; | ||
| 1121 | |||
| 1116 | #ifdef _LIBCPP_ATOMIC_ONLY_USE_BUILTINS | 1122 | #ifdef _LIBCPP_ATOMIC_ONLY_USE_BUILTINS |
| 1117 | 1123 | ||
| 1118 | template<typename _Tp> | 1124 | template<typename _Tp> |
| ... | @@ -1404,42 +1410,8 @@ _Tp __cxx_atomic_fetch_xor(__cxx_atomic_lock_impl<_Tp>* __a, | ... | @@ -1404,42 +1410,8 @@ _Tp __cxx_atomic_fetch_xor(__cxx_atomic_lock_impl<_Tp>* __a, |
| 1404 | return __old; | 1410 | return __old; |
| 1405 | } | 1411 | } |
| 1406 | 1412 | ||
| 1407 | #ifdef __cpp_lib_atomic_is_always_lock_free | ||
| 1408 | |||
| 1409 | template<typename _Tp> struct __cxx_is_always_lock_free { | ||
| 1410 | enum { __value = __atomic_always_lock_free(sizeof(_Tp), 0) }; }; | ||
| 1411 | |||
| 1412 | #else | ||
| 1413 | |||
| 1414 | template<typename _Tp> struct __cxx_is_always_lock_free { enum { __value = false }; }; | ||
| 1415 | // Implementations must match the C ATOMIC_*_LOCK_FREE macro values. | ||
| 1416 | template<> struct __cxx_is_always_lock_free<bool> { enum { __value = 2 == ATOMIC_BOOL_LOCK_FREE }; }; | ||
| 1417 | template<> struct __cxx_is_always_lock_free<char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; | ||
| 1418 | template<> struct __cxx_is_always_lock_free<signed char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; | ||
| 1419 | template<> struct __cxx_is_always_lock_free<unsigned char> { enum { __value = 2 == ATOMIC_CHAR_LOCK_FREE }; }; | ||
| 1420 | #ifndef _LIBCPP_HAS_NO_CHAR8_T | ||
| 1421 | template<> struct __cxx_is_always_lock_free<char8_t> { enum { __value = 2 == ATOMIC_CHAR8_T_LOCK_FREE }; }; | ||
| 1422 | #endif | ||
| 1423 | template<> struct __cxx_is_always_lock_free<char16_t> { enum { __value = 2 == ATOMIC_CHAR16_T_LOCK_FREE }; }; | ||
| 1424 | template<> struct __cxx_is_always_lock_free<char32_t> { enum { __value = 2 == ATOMIC_CHAR32_T_LOCK_FREE }; }; | ||
| 1425 | #ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS | ||
| 1426 | template<> struct __cxx_is_always_lock_free<wchar_t> { enum { __value = 2 == ATOMIC_WCHAR_T_LOCK_FREE }; }; | ||
| 1427 | #endif | ||
| 1428 | template<> struct __cxx_is_always_lock_free<short> { enum { __value = 2 == ATOMIC_SHORT_LOCK_FREE }; }; | ||
| 1429 | template<> struct __cxx_is_always_lock_free<unsigned short> { enum { __value = 2 == ATOMIC_SHORT_LOCK_FREE }; }; | ||
| 1430 | template<> struct __cxx_is_always_lock_free<int> { enum { __value = 2 == ATOMIC_INT_LOCK_FREE }; }; | ||
| 1431 | template<> struct __cxx_is_always_lock_free<unsigned int> { enum { __value = 2 == ATOMIC_INT_LOCK_FREE }; }; | ||
| 1432 | template<> struct __cxx_is_always_lock_free<long> { enum { __value = 2 == ATOMIC_LONG_LOCK_FREE }; }; | ||
| 1433 | template<> struct __cxx_is_always_lock_free<unsigned long> { enum { __value = 2 == ATOMIC_LONG_LOCK_FREE }; }; | ||
| 1434 | template<> struct __cxx_is_always_lock_free<long long> { enum { __value = 2 == ATOMIC_LLONG_LOCK_FREE }; }; | ||
| 1435 | template<> struct __cxx_is_always_lock_free<unsigned long long> { enum { __value = 2 == ATOMIC_LLONG_LOCK_FREE }; }; | ||
| 1436 | template<typename _Tp> struct __cxx_is_always_lock_free<_Tp*> { enum { __value = 2 == ATOMIC_POINTER_LOCK_FREE }; }; | ||
| 1437 | template<> struct __cxx_is_always_lock_free<std::nullptr_t> { enum { __value = 2 == ATOMIC_POINTER_LOCK_FREE }; }; | ||
| 1438 | |||
| 1439 | #endif //__cpp_lib_atomic_is_always_lock_free | ||
| 1440 | |||
| 1441 | template <typename _Tp, | 1413 | template <typename _Tp, |
| 1442 | typename _Base = typename conditional<__cxx_is_always_lock_free<_Tp>::__value, | 1414 | typename _Base = typename conditional<__libcpp_is_always_lock_free<_Tp>::__value, |
| 1443 | __cxx_atomic_base_impl<_Tp>, | 1415 | __cxx_atomic_base_impl<_Tp>, |
| 1444 | __cxx_atomic_lock_impl<_Tp> >::type> | 1416 | __cxx_atomic_lock_impl<_Tp> >::type> |
| 1445 | #else | 1417 | #else |
| ... | @@ -1561,7 +1533,7 @@ struct __atomic_base // false | ... | @@ -1561,7 +1533,7 @@ struct __atomic_base // false |
| 1561 | mutable __cxx_atomic_impl<_Tp> __a_; | 1533 | mutable __cxx_atomic_impl<_Tp> __a_; |
| 1562 | 1534 | ||
| 1563 | #if defined(__cpp_lib_atomic_is_always_lock_free) | 1535 | #if defined(__cpp_lib_atomic_is_always_lock_free) |
| 1564 | static _LIBCPP_CONSTEXPR bool is_always_lock_free = __atomic_always_lock_free(sizeof(__a_), 0); | 1536 | static _LIBCPP_CONSTEXPR bool is_always_lock_free = __libcpp_is_always_lock_free<__cxx_atomic_impl<_Tp> >::__value; |
| 1565 | #endif | 1537 | #endif |
| 1566 | 1538 | ||
| 1567 | _LIBCPP_INLINE_VISIBILITY | 1539 | _LIBCPP_INLINE_VISIBILITY |
| ... | @@ -2664,7 +2636,7 @@ typedef atomic<uintmax_t> atomic_uintmax_t; | ... | @@ -2664,7 +2636,7 @@ typedef atomic<uintmax_t> atomic_uintmax_t; |
| 2664 | // atomic_*_lock_free : prefer the contention type most highly, then the largest lock-free type | 2636 | // atomic_*_lock_free : prefer the contention type most highly, then the largest lock-free type |
| 2665 | 2637 | ||
| 2666 | #ifdef __cpp_lib_atomic_is_always_lock_free | 2638 | #ifdef __cpp_lib_atomic_is_always_lock_free |
| 2667 | # define _LIBCPP_CONTENTION_LOCK_FREE __atomic_always_lock_free(sizeof(__cxx_contention_t), 0) | 2639 | # define _LIBCPP_CONTENTION_LOCK_FREE ::std::__libcpp_is_always_lock_free<__cxx_contention_t>::__value |
| 2668 | #else | 2640 | #else |
| 2669 | # define _LIBCPP_CONTENTION_LOCK_FREE false | 2641 | # define _LIBCPP_CONTENTION_LOCK_FREE false |
| 2670 | #endif | 2642 | #endif |
lib/libcxx/include/regex+1-1| ... | @@ -1355,7 +1355,7 @@ inline _LIBCPP_INLINE_VISIBILITY | ... | @@ -1355,7 +1355,7 @@ inline _LIBCPP_INLINE_VISIBILITY |
| 1355 | unsigned char __to_lower(unsigned char __c) | 1355 | unsigned char __to_lower(unsigned char __c) |
| 1356 | { | 1356 | { |
| 1357 | #if defined(__MVS__) && !defined(__NATIVE_ASCII_F) | 1357 | #if defined(__MVS__) && !defined(__NATIVE_ASCII_F) |
| 1358 | return c & 0xBF; | 1358 | return __c & 0xBF; |
| 1359 | #else | 1359 | #else |
| 1360 | return __c | 0x20; | 1360 | return __c | 0x20; |
| 1361 | #endif | 1361 | #endif |
lib/libcxx/include/stdatomic.h+2-2| ... | @@ -121,7 +121,7 @@ using std::atomic_signal_fence // see below | ... | @@ -121,7 +121,7 @@ using std::atomic_signal_fence // see below |
| 121 | # pragma GCC system_header | 121 | # pragma GCC system_header |
| 122 | #endif | 122 | #endif |
| 123 | 123 | ||
| 124 | #if _LIBCPP_STD_VER > 20 | 124 | #if defined(__cplusplus) && _LIBCPP_STD_VER > 20 |
| 125 | 125 | ||
| 126 | #include <atomic> | 126 | #include <atomic> |
| 127 | #include <version> | 127 | #include <version> |
| ... | @@ -230,6 +230,6 @@ using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS; | ... | @@ -230,6 +230,6 @@ using std::atomic_thread_fence _LIBCPP_USING_IF_EXISTS; |
| 230 | # include_next <stdatomic.h> | 230 | # include_next <stdatomic.h> |
| 231 | # endif | 231 | # endif |
| 232 | 232 | ||
| 233 | #endif // _LIBCPP_STD_VER > 20 | 233 | #endif // defined(__cplusplus) && _LIBCPP_STD_VER > 20 |
| 234 | 234 | ||
| 235 | #endif // _LIBCPP_STDATOMIC_H | 235 | #endif // _LIBCPP_STDATOMIC_H |
lib/libcxx/include/version+1-1| ... | @@ -332,7 +332,7 @@ __cpp_lib_void_t 201411L <type_traits> | ... | @@ -332,7 +332,7 @@ __cpp_lib_void_t 201411L <type_traits> |
| 332 | # undef __cpp_lib_execution | 332 | # undef __cpp_lib_execution |
| 333 | // # define __cpp_lib_execution 201902L | 333 | // # define __cpp_lib_execution 201902L |
| 334 | # if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) | 334 | # if !defined(_LIBCPP_AVAILABILITY_DISABLE_FTM___cpp_lib_format) && !defined(_LIBCPP_HAS_NO_INCOMPLETE_FORMAT) |
| 335 | # define __cpp_lib_format 202106L | 335 | // # define __cpp_lib_format 202106L |
| 336 | # endif | 336 | # endif |
| 337 | # define __cpp_lib_generic_unordered_lookup 201811L | 337 | # define __cpp_lib_generic_unordered_lookup 201811L |
| 338 | # define __cpp_lib_int_pow2 202002L | 338 | # define __cpp_lib_int_pow2 202002L |