| author | |
| committer | |
| log | a072d6021653db952bffd93e7c8704ead9ac106d |
| tree | ecf60931a2ab0cf74ff6d0e1259236f96d22f390 |
| parent | 9f88510f6f3531461dad8a660ba77b944510d0fa |
| signature |
19 files changed, 131 insertions(+), 95 deletions(-)
lib/libcxxabi/include/__cxxabi_config.h+6| ... | @@ -128,4 +128,10 @@ | ... | @@ -128,4 +128,10 @@ |
| 128 | # define _LIBCXXABI_NOEXCEPT noexcept | 128 | # define _LIBCXXABI_NOEXCEPT noexcept |
| 129 | #endif | 129 | #endif |
| 130 | 130 | ||
| 131 | #if defined(__POINTER_FIELD_PROTECTION_ABI__) | ||
| 132 | # define _LIBCXXABI_DISABLE_POINTER_FIELD_PROTECTION [[_Clang::__no_field_protection__]] | ||
| 133 | #else | ||
| 134 | # define _LIBCXXABI_DISABLE_POINTER_FIELD_PROTECTION | ||
| 135 | #endif | ||
| 136 | |||
| 131 | #endif // ____CXXABI_CONFIG_H | 137 | #endif // ____CXXABI_CONFIG_H |
lib/libcxxabi/include/cxxabi.h+10-11| ... | @@ -19,8 +19,7 @@ | ... | @@ -19,8 +19,7 @@ |
| 19 | 19 | ||
| 20 | #include <__cxxabi_config.h> | 20 | #include <__cxxabi_config.h> |
| 21 | 21 | ||
| 22 | #define _LIBCPPABI_VERSION 15000 | 22 | #define _LIBCPPABI_VERSION 230000 |
| 23 | #define _LIBCXXABI_NORETURN __attribute__((noreturn)) | ||
| 24 | #define _LIBCXXABI_ALWAYS_COLD __attribute__((cold)) | 23 | #define _LIBCXXABI_ALWAYS_COLD __attribute__((cold)) |
| 25 | 24 | ||
| 26 | #ifdef __cplusplus | 25 | #ifdef __cplusplus |
| ... | @@ -31,7 +30,7 @@ class _LIBCXXABI_TYPE_VIS type_info; // forward declaration | ... | @@ -31,7 +30,7 @@ class _LIBCXXABI_TYPE_VIS type_info; // forward declaration |
| 31 | #else | 30 | #else |
| 32 | class type_info; // forward declaration | 31 | class type_info; // forward declaration |
| 33 | #endif | 32 | #endif |
| 34 | } | 33 | } // namespace std |
| 35 | 34 | ||
| 36 | 35 | ||
| 37 | // runtime routines use C calling conventions, but are in __cxxabiv1 namespace | 36 | // runtime routines use C calling conventions, but are in __cxxabiv1 namespace |
| ... | @@ -56,7 +55,7 @@ __cxa_init_primary_exception(void* object, std::type_info* tinfo, void(_LIBCXXAB | ... | @@ -56,7 +55,7 @@ __cxa_init_primary_exception(void* object, std::type_info* tinfo, void(_LIBCXXAB |
| 56 | #endif | 55 | #endif |
| 57 | 56 | ||
| 58 | // 2.4.3 Throwing the Exception Object | 57 | // 2.4.3 Throwing the Exception Object |
| 59 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void | 58 | [[__noreturn__]] extern _LIBCXXABI_FUNC_VIS void |
| 60 | __cxa_throw(void *thrown_exception, std::type_info *tinfo, | 59 | __cxa_throw(void *thrown_exception, std::type_info *tinfo, |
| 61 | #ifdef __wasm__ | 60 | #ifdef __wasm__ |
| 62 | void *(_LIBCXXABI_DTOR_FUNC *dest)(void *)); | 61 | void *(_LIBCXXABI_DTOR_FUNC *dest)(void *)); |
| ... | @@ -80,22 +79,22 @@ extern _LIBCXXABI_FUNC_VIS std::type_info *__cxa_current_exception_type(); | ... | @@ -80,22 +79,22 @@ extern _LIBCXXABI_FUNC_VIS std::type_info *__cxa_current_exception_type(); |
| 80 | // GNU extension | 79 | // GNU extension |
| 81 | // Calls `terminate` with the current exception being caught. This function is used by GCC when a `noexcept` function | 80 | // Calls `terminate` with the current exception being caught. This function is used by GCC when a `noexcept` function |
| 82 | // throws an exception inside a try/catch block and doesn't catch it. | 81 | // throws an exception inside a try/catch block and doesn't catch it. |
| 83 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_call_terminate(void*) _LIBCXXABI_NOEXCEPT; | 82 | [[__noreturn__]] extern _LIBCXXABI_FUNC_VIS void __cxa_call_terminate(void*) _LIBCXXABI_NOEXCEPT; |
| 84 | 83 | ||
| 85 | // 2.5.4 Rethrowing Exceptions | 84 | // 2.5.4 Rethrowing Exceptions |
| 86 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_rethrow(); | 85 | [[__noreturn__]] extern _LIBCXXABI_FUNC_VIS void __cxa_rethrow(); |
| 87 | 86 | ||
| 88 | // 2.6 Auxiliary Runtime APIs | 87 | // 2.6 Auxiliary Runtime APIs |
| 89 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_cast(void); | 88 | [[__noreturn__]] extern _LIBCXXABI_FUNC_VIS void __cxa_bad_cast(void); |
| 90 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_typeid(void); | 89 | [[__noreturn__]] extern _LIBCXXABI_FUNC_VIS void __cxa_bad_typeid(void); |
| 91 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void | 90 | [[__noreturn__]] extern _LIBCXXABI_FUNC_VIS void |
| 92 | __cxa_throw_bad_array_new_length(void); | 91 | __cxa_throw_bad_array_new_length(void); |
| 93 | 92 | ||
| 94 | // 3.2.6 Pure Virtual Function API | 93 | // 3.2.6 Pure Virtual Function API |
| 95 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_pure_virtual(void); | 94 | [[__noreturn__]] extern _LIBCXXABI_FUNC_VIS void __cxa_pure_virtual(void); |
| 96 | 95 | ||
| 97 | // 3.2.7 Deleted Virtual Function API | 96 | // 3.2.7 Deleted Virtual Function API |
| 98 | extern _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_deleted_virtual(void); | 97 | [[__noreturn__]] extern _LIBCXXABI_FUNC_VIS void __cxa_deleted_virtual(void); |
| 99 | 98 | ||
| 100 | // 3.3.2 One-time Construction API | 99 | // 3.3.2 One-time Construction API |
| 101 | #if defined(_LIBCXXABI_GUARD_ABI_ARM) | 100 | #if defined(_LIBCXXABI_GUARD_ABI_ARM) |
lib/libcxxabi/src/abort_message.h+1-1| ... | @@ -11,7 +11,7 @@ | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | ||
| 12 | #include "cxxabi.h" | 12 | #include "cxxabi.h" |
| 13 | 13 | ||
| 14 | extern "C" _LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN void | 14 | extern "C" [[noreturn]] _LIBCXXABI_HIDDEN void |
| 15 | __abort_message(const char *format, ...) __attribute__((format(printf, 1, 2))); | 15 | __abort_message(const char *format, ...) __attribute__((format(printf, 1, 2))); |
| 16 | 16 | ||
| 17 | #ifndef _LIBCXXABI_ASSERT | 17 | #ifndef _LIBCXXABI_ASSERT |
lib/libcxxabi/src/cxa_aux_runtime.cpp+3-3| ... | @@ -16,7 +16,7 @@ | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | ||
| 17 | namespace __cxxabiv1 { | 17 | namespace __cxxabiv1 { |
| 18 | extern "C" { | 18 | extern "C" { |
| 19 | _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_cast(void) { | 19 | [[noreturn]] _LIBCXXABI_FUNC_VIS void __cxa_bad_cast(void) { |
| 20 | #ifndef _LIBCXXABI_NO_EXCEPTIONS | 20 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 21 | throw std::bad_cast(); | 21 | throw std::bad_cast(); |
| 22 | #else | 22 | #else |
| ... | @@ -24,7 +24,7 @@ _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_cast(void) { | ... | @@ -24,7 +24,7 @@ _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_cast(void) { |
| 24 | #endif | 24 | #endif |
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_typeid(void) { | 27 | [[noreturn]] _LIBCXXABI_FUNC_VIS void __cxa_bad_typeid(void) { |
| 28 | #ifndef _LIBCXXABI_NO_EXCEPTIONS | 28 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 29 | throw std::bad_typeid(); | 29 | throw std::bad_typeid(); |
| 30 | #else | 30 | #else |
| ... | @@ -32,7 +32,7 @@ _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_typeid(void) { | ... | @@ -32,7 +32,7 @@ _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void __cxa_bad_typeid(void) { |
| 32 | #endif | 32 | #endif |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN void | 35 | [[noreturn]] _LIBCXXABI_FUNC_VIS void |
| 36 | __cxa_throw_bad_array_new_length(void) { | 36 | __cxa_throw_bad_array_new_length(void) { |
| 37 | #ifndef _LIBCXXABI_NO_EXCEPTIONS | 37 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 38 | throw std::bad_array_new_length(); | 38 | throw std::bad_array_new_length(); |
lib/libcxxabi/src/cxa_default_handlers.cpp+4-6| ... | @@ -24,8 +24,7 @@ | ... | @@ -24,8 +24,7 @@ |
| 24 | static constinit const char* cause = "uncaught"; | 24 | static constinit const char* cause = "uncaught"; |
| 25 | 25 | ||
| 26 | # ifndef _LIBCXXABI_NO_EXCEPTIONS | 26 | # ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 27 | __attribute__((noreturn)) | 27 | [[noreturn]] static void demangling_terminate_handler() |
| 28 | static void demangling_terminate_handler() | ||
| 29 | { | 28 | { |
| 30 | using namespace __cxxabiv1; | 29 | using namespace __cxxabiv1; |
| 31 | __cxa_eh_globals* globals = __cxa_get_globals_fast(); | 30 | __cxa_eh_globals* globals = __cxa_get_globals_fast(); |
| ... | @@ -78,15 +77,14 @@ static void demangling_terminate_handler() | ... | @@ -78,15 +77,14 @@ static void demangling_terminate_handler() |
| 78 | } | 77 | } |
| 79 | } | 78 | } |
| 80 | #else // !_LIBCXXABI_NO_EXCEPTIONS | 79 | #else // !_LIBCXXABI_NO_EXCEPTIONS |
| 81 | __attribute__((noreturn)) | 80 | [[noreturn]] static void demangling_terminate_handler() |
| 82 | static void demangling_terminate_handler() | ||
| 83 | { | 81 | { |
| 82 | (void)cause; | ||
| 84 | __abort_message("terminating"); | 83 | __abort_message("terminating"); |
| 85 | } | 84 | } |
| 86 | #endif // !_LIBCXXABI_NO_EXCEPTIONS | 85 | #endif // !_LIBCXXABI_NO_EXCEPTIONS |
| 87 | 86 | ||
| 88 | __attribute__((noreturn)) | 87 | [[noreturn]] static void demangling_unexpected_handler() |
| 89 | static void demangling_unexpected_handler() | ||
| 90 | { | 88 | { |
| 91 | cause = "unexpected"; | 89 | cause = "unexpected"; |
| 92 | std::terminate(); | 90 | std::terminate(); |
lib/libcxxabi/src/cxa_exception.cpp+1-1| ... | @@ -140,7 +140,7 @@ exception_cleanup_func(_Unwind_Reason_Code reason, _Unwind_Exception* unwind_exc | ... | @@ -140,7 +140,7 @@ exception_cleanup_func(_Unwind_Reason_Code reason, _Unwind_Exception* unwind_exc |
| 140 | __cxa_decrement_exception_refcount(unwind_exception + 1); | 140 | __cxa_decrement_exception_refcount(unwind_exception + 1); |
| 141 | } | 141 | } |
| 142 | 142 | ||
| 143 | static _LIBCXXABI_NORETURN void failed_throw(__cxa_exception* exception_header) { | 143 | [[noreturn]] static void failed_throw(__cxa_exception* exception_header) { |
| 144 | // Section 2.5.3 says: | 144 | // Section 2.5.3 says: |
| 145 | // * For purposes of this ABI, several things are considered exception handlers: | 145 | // * For purposes of this ABI, several things are considered exception handlers: |
| 146 | // ** A terminate() call due to a throw. | 146 | // ** A terminate() call due to a throw. |
lib/libcxxabi/src/cxa_guard_impl.h+1-1| ... | @@ -637,7 +637,7 @@ struct GlobalStatic { | ... | @@ -637,7 +637,7 @@ struct GlobalStatic { |
| 637 | static T instance; | 637 | static T instance; |
| 638 | }; | 638 | }; |
| 639 | template <class T> | 639 | template <class T> |
| 640 | _LIBCPP_CONSTINIT T GlobalStatic<T>::instance = {}; | 640 | constinit T GlobalStatic<T>::instance = {}; |
| 641 | 641 | ||
| 642 | enum class Implementation { NoThreads, GlobalMutex, Futex }; | 642 | enum class Implementation { NoThreads, GlobalMutex, Futex }; |
| 643 | 643 |
lib/libcxxabi/src/cxa_handlers.cpp+2-4| ... | @@ -36,8 +36,7 @@ __unexpected(unexpected_handler func) | ... | @@ -36,8 +36,7 @@ __unexpected(unexpected_handler func) |
| 36 | __abort_message("unexpected_handler unexpectedly returned"); | 36 | __abort_message("unexpected_handler unexpectedly returned"); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | __attribute__((noreturn)) | 39 | [[noreturn]] void |
| 40 | void | ||
| 41 | unexpected() | 40 | unexpected() |
| 42 | { | 41 | { |
| 43 | __unexpected(get_unexpected()); | 42 | __unexpected(get_unexpected()); |
| ... | @@ -69,8 +68,7 @@ __terminate(terminate_handler func) noexcept | ... | @@ -69,8 +68,7 @@ __terminate(terminate_handler func) noexcept |
| 69 | #endif // _LIBCXXABI_NO_EXCEPTIONS | 68 | #endif // _LIBCXXABI_NO_EXCEPTIONS |
| 70 | } | 69 | } |
| 71 | 70 | ||
| 72 | __attribute__((noreturn)) | 71 | [[noreturn]] void |
| 73 | void | ||
| 74 | terminate() noexcept | 72 | terminate() noexcept |
| 75 | { | 73 | { |
| 76 | #ifndef _LIBCXXABI_NO_EXCEPTIONS | 74 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
lib/libcxxabi/src/cxa_handlers.h+2-2| ... | @@ -19,11 +19,11 @@ | ... | @@ -19,11 +19,11 @@ |
| 19 | namespace std | 19 | namespace std |
| 20 | { | 20 | { |
| 21 | 21 | ||
| 22 | _LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN | 22 | [[noreturn]] _LIBCXXABI_HIDDEN |
| 23 | void | 23 | void |
| 24 | __unexpected(unexpected_handler func); | 24 | __unexpected(unexpected_handler func); |
| 25 | 25 | ||
| 26 | _LIBCXXABI_HIDDEN _LIBCXXABI_NORETURN | 26 | [[noreturn]] _LIBCXXABI_HIDDEN |
| 27 | void | 27 | void |
| 28 | __terminate(terminate_handler func) noexcept; | 28 | __terminate(terminate_handler func) noexcept; |
| 29 | 29 |
lib/libcxxabi/src/cxa_personality.cpp+3-15| ... | @@ -23,7 +23,7 @@ | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | ||
| 24 | #if __has_feature(ptrauth_calls) | 24 | #if __has_feature(ptrauth_calls) |
| 25 | 25 | ||
| 26 | // CXXABI depends on defintions in libunwind as pointer auth couples the | 26 | // CXXABI depends on definitions in libunwind as pointer auth couples the |
| 27 | // definitions | 27 | // definitions |
| 28 | # include "libunwind.h" | 28 | # include "libunwind.h" |
| 29 | 29 | ||
| ... | @@ -67,15 +67,6 @@ | ... | @@ -67,15 +67,6 @@ |
| 67 | # pragma clang diagnostic ignored "-Wmissing-prototypes" | 67 | # pragma clang diagnostic ignored "-Wmissing-prototypes" |
| 68 | #endif | 68 | #endif |
| 69 | 69 | ||
| 70 | // TODO: This is a temporary workaround for libc++abi to recognize that it's being | ||
| 71 | // built against LLVM's libunwind. LLVM's libunwind started reporting _LIBUNWIND_VERSION | ||
| 72 | // in LLVM 15 -- we can remove this workaround after shipping LLVM 17. Once we remove | ||
| 73 | // this workaround, it won't be possible to build libc++abi against libunwind headers | ||
| 74 | // from LLVM 14 and before anymore. | ||
| 75 | #if defined(____LIBUNWIND_CONFIG_H__) && !defined(_LIBUNWIND_VERSION) | ||
| 76 | # define _LIBUNWIND_VERSION | ||
| 77 | #endif | ||
| 78 | |||
| 79 | #if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) | 70 | #if defined(__SEH__) && !defined(__USING_SJLJ_EXCEPTIONS__) |
| 80 | #include <windows.h> | 71 | #include <windows.h> |
| 81 | #include <winnt.h> | 72 | #include <winnt.h> |
| ... | @@ -1125,9 +1116,7 @@ __gxx_personality_seh0(PEXCEPTION_RECORD ms_exc, void *this_frame, | ... | @@ -1125,9 +1116,7 @@ __gxx_personality_seh0(PEXCEPTION_RECORD ms_exc, void *this_frame, |
| 1125 | 1116 | ||
| 1126 | #else | 1117 | #else |
| 1127 | 1118 | ||
| 1128 | // zig patch: https://github.com/llvm/llvm-project/issues/194232 | 1119 | extern "C" _Unwind_Reason_Code __gnu_unwind_frame(_Unwind_Exception*, _Unwind_Context*); |
| 1129 | extern "C" _Unwind_Reason_Code __gnu_unwind_frame(_Unwind_Exception*, | ||
| 1130 | _Unwind_Context*); | ||
| 1131 | 1120 | ||
| 1132 | // Helper function to unwind one frame. | 1121 | // Helper function to unwind one frame. |
| 1133 | // ARM EHABI 7.3 and 7.4: If the personality function returns _URC_CONTINUE_UNWIND, the | 1122 | // ARM EHABI 7.3 and 7.4: If the personality function returns _URC_CONTINUE_UNWIND, the |
| ... | @@ -1283,8 +1272,7 @@ __gxx_personality_v0(_Unwind_State state, | ... | @@ -1283,8 +1272,7 @@ __gxx_personality_v0(_Unwind_State state, |
| 1283 | #endif | 1272 | #endif |
| 1284 | 1273 | ||
| 1285 | 1274 | ||
| 1286 | __attribute__((noreturn)) | 1275 | [[noreturn]] _LIBCXXABI_FUNC_VIS void |
| 1287 | _LIBCXXABI_FUNC_VIS void | ||
| 1288 | __cxa_call_unexpected(void* arg) | 1276 | __cxa_call_unexpected(void* arg) |
| 1289 | { | 1277 | { |
| 1290 | _Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(arg); | 1278 | _Unwind_Exception* unwind_exception = static_cast<_Unwind_Exception*>(arg); |
lib/libcxxabi/src/cxa_vector.cpp+1-2| ... | @@ -116,8 +116,7 @@ namespace { | ... | @@ -116,8 +116,7 @@ namespace { |
| 116 | // | 116 | // |
| 117 | 117 | ||
| 118 | namespace { | 118 | namespace { |
| 119 | _LIBCXXABI_NORETURN | 119 | [[noreturn]] void throw_bad_array_new_length() { |
| 120 | void throw_bad_array_new_length() { | ||
| 121 | #ifndef _LIBCXXABI_NO_EXCEPTIONS | 120 | #ifndef _LIBCXXABI_NO_EXCEPTIONS |
| 122 | throw std::bad_array_new_length(); | 121 | throw std::bad_array_new_length(); |
| 123 | #else | 122 | #else |
lib/libcxxabi/src/cxa_virtual.cpp+2-2| ... | @@ -11,12 +11,12 @@ | ... | @@ -11,12 +11,12 @@ |
| 11 | 11 | ||
| 12 | namespace __cxxabiv1 { | 12 | namespace __cxxabiv1 { |
| 13 | extern "C" { | 13 | extern "C" { |
| 14 | _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN | 14 | [[noreturn]] _LIBCXXABI_FUNC_VIS |
| 15 | void __cxa_pure_virtual(void) { | 15 | void __cxa_pure_virtual(void) { |
| 16 | __abort_message("Pure virtual function called!"); | 16 | __abort_message("Pure virtual function called!"); |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | _LIBCXXABI_FUNC_VIS _LIBCXXABI_NORETURN | 19 | [[noreturn]] _LIBCXXABI_FUNC_VIS |
| 20 | void __cxa_deleted_virtual(void) { | 20 | void __cxa_deleted_virtual(void) { |
| 21 | __abort_message("Deleted virtual function called!"); | 21 | __abort_message("Deleted virtual function called!"); |
| 22 | } | 22 | } |
lib/libcxxabi/src/demangle/ItaniumDemangle.h+54| ... | @@ -1537,6 +1537,27 @@ public: | ... | @@ -1537,6 +1537,27 @@ public: |
| 1537 | } | 1537 | } |
| 1538 | }; | 1538 | }; |
| 1539 | 1539 | ||
| 1540 | class PackIndexing final : public Node { | ||
| 1541 | const Node *Pattern; | ||
| 1542 | const Node *Index; | ||
| 1543 | |||
| 1544 | public: | ||
| 1545 | PackIndexing(const Node *Pattern_, const Node *Index_) | ||
| 1546 | : Node(KPackIndexing), Pattern(Pattern_), Index(Index_) {} | ||
| 1547 | |||
| 1548 | template <typename Fn> void match(Fn F) const { F(Pattern, Index); } | ||
| 1549 | |||
| 1550 | void printLeft(OutputBuffer &OB) const override { | ||
| 1551 | OB.printOpen('('); | ||
| 1552 | ParameterPackExpansion PPE(Pattern); | ||
| 1553 | PPE.printLeft(OB); | ||
| 1554 | OB.printClose(')'); | ||
| 1555 | OB.printOpen('['); | ||
| 1556 | OB.printLeft(*Index); | ||
| 1557 | OB.printClose(']'); | ||
| 1558 | } | ||
| 1559 | }; | ||
| 1560 | |||
| 1540 | class TemplateArgs final : public Node { | 1561 | class TemplateArgs final : public Node { |
| 1541 | NodeArray Params; | 1562 | NodeArray Params; |
| 1542 | Node *Requires; | 1563 | Node *Requires; |
| ... | @@ -4531,6 +4552,18 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() { | ... | @@ -4531,6 +4552,18 @@ Node *AbstractManglingParser<Derived, Alloc>::parseType() { |
| 4531 | Result = make<ParameterPackExpansion>(Child); | 4552 | Result = make<ParameterPackExpansion>(Child); |
| 4532 | break; | 4553 | break; |
| 4533 | } | 4554 | } |
| 4555 | // ::= Dy <type> <expression> # pack indexing (C++26) | ||
| 4556 | case 'y': { | ||
| 4557 | First += 2; | ||
| 4558 | Node *Pattern = getDerived().parseType(); | ||
| 4559 | if (!Pattern) | ||
| 4560 | return nullptr; | ||
| 4561 | Node *Index = getDerived().parseExpr(); | ||
| 4562 | if (!Index) | ||
| 4563 | return nullptr; | ||
| 4564 | Result = make<PackIndexing>(Pattern, Index); | ||
| 4565 | break; | ||
| 4566 | } | ||
| 4534 | // Exception specifier on a function type. | 4567 | // Exception specifier on a function type. |
| 4535 | case 'o': | 4568 | case 'o': |
| 4536 | case 'O': | 4569 | case 'O': |
| ... | @@ -5375,6 +5408,16 @@ Node *AbstractManglingParser<Derived, Alloc>::parseExpr() { | ... | @@ -5375,6 +5408,16 @@ Node *AbstractManglingParser<Derived, Alloc>::parseExpr() { |
| 5375 | return nullptr; | 5408 | return nullptr; |
| 5376 | return make<ParameterPackExpansion>(Child); | 5409 | return make<ParameterPackExpansion>(Child); |
| 5377 | } | 5410 | } |
| 5411 | if (consumeIf("sy")) { | ||
| 5412 | Node *Pattern = look() == 'T' ? getDerived().parseTemplateParam() | ||
| 5413 | : getDerived().parseFunctionParam(); | ||
| 5414 | if (Pattern == nullptr) | ||
| 5415 | return nullptr; | ||
| 5416 | Node *Index = getDerived().parseExpr(); | ||
| 5417 | if (Index == nullptr) | ||
| 5418 | return nullptr; | ||
| 5419 | return make<PackIndexing>(Pattern, Index); | ||
| 5420 | } | ||
| 5378 | if (consumeIf("sZ")) { | 5421 | if (consumeIf("sZ")) { |
| 5379 | if (look() == 'T') { | 5422 | if (look() == 'T') { |
| 5380 | Node *R = getDerived().parseTemplateParam(); | 5423 | Node *R = getDerived().parseTemplateParam(); |
| ... | @@ -6157,8 +6200,17 @@ AbstractManglingParser<Derived, Alloc>::parseTemplateArgs(bool TagTemplates) { | ... | @@ -6157,8 +6200,17 @@ AbstractManglingParser<Derived, Alloc>::parseTemplateArgs(bool TagTemplates) { |
| 6157 | // extension ::= ___Z <encoding> _block_invoke | 6200 | // extension ::= ___Z <encoding> _block_invoke |
| 6158 | // extension ::= ___Z <encoding> _block_invoke<decimal-digit>+ | 6201 | // extension ::= ___Z <encoding> _block_invoke<decimal-digit>+ |
| 6159 | // extension ::= ___Z <encoding> _block_invoke_<decimal-digit>+ | 6202 | // extension ::= ___Z <encoding> _block_invoke_<decimal-digit>+ |
| 6203 | // extension ::= __alloc_token__Z <encoding> | ||
| 6204 | // extension ::= __alloc_token_<decimal-digit>+__Z <encoding> | ||
| 6160 | template <typename Derived, typename Alloc> | 6205 | template <typename Derived, typename Alloc> |
| 6161 | Node *AbstractManglingParser<Derived, Alloc>::parse(bool ParseParams) { | 6206 | Node *AbstractManglingParser<Derived, Alloc>::parse(bool ParseParams) { |
| 6207 | bool AllocToken = consumeIf("__alloc_token_"); | ||
| 6208 | if (AllocToken) { | ||
| 6209 | const char *Saved = First; | ||
| 6210 | if (parseNumber().empty() || !consumeIf('_')) | ||
| 6211 | First = Saved; | ||
| 6212 | } | ||
| 6213 | |||
| 6162 | if (consumeIf("_Z") || consumeIf("__Z")) { | 6214 | if (consumeIf("_Z") || consumeIf("__Z")) { |
| 6163 | Node *Encoding = getDerived().parseEncoding(ParseParams); | 6215 | Node *Encoding = getDerived().parseEncoding(ParseParams); |
| 6164 | if (Encoding == nullptr) | 6216 | if (Encoding == nullptr) |
| ... | @@ -6168,6 +6220,8 @@ Node *AbstractManglingParser<Derived, Alloc>::parse(bool ParseParams) { | ... | @@ -6168,6 +6220,8 @@ Node *AbstractManglingParser<Derived, Alloc>::parse(bool ParseParams) { |
| 6168 | make<DotSuffix>(Encoding, std::string_view(First, Last - First)); | 6220 | make<DotSuffix>(Encoding, std::string_view(First, Last - First)); |
| 6169 | First = Last; | 6221 | First = Last; |
| 6170 | } | 6222 | } |
| 6223 | if (AllocToken) | ||
| 6224 | Encoding = make<DotSuffix>(Encoding, ".alloc_token"); | ||
| 6171 | if (numLeft() != 0) | 6225 | if (numLeft() != 0) |
| 6172 | return nullptr; | 6226 | return nullptr; |
| 6173 | return Encoding; | 6227 | return Encoding; |
lib/libcxxabi/src/demangle/ItaniumNodes.def+1-1| ... | @@ -100,5 +100,5 @@ NODE(ExprRequirement) | ... | @@ -100,5 +100,5 @@ NODE(ExprRequirement) |
| 100 | NODE(TypeRequirement) | 100 | NODE(TypeRequirement) |
| 101 | NODE(NestedRequirement) | 101 | NODE(NestedRequirement) |
| 102 | NODE(ExplicitObjectParameter) | 102 | NODE(ExplicitObjectParameter) |
| 103 | 103 | NODE(PackIndexing) | |
| 104 | #undef NODE | 104 | #undef NODE |
lib/libcxxabi/src/demangle/Utility.h+1-1| ... | @@ -31,7 +31,7 @@ class Node; | ... | @@ -31,7 +31,7 @@ class Node; |
| 31 | 31 | ||
| 32 | // Stream that AST nodes write their string representation into after the AST | 32 | // Stream that AST nodes write their string representation into after the AST |
| 33 | // has been parsed. | 33 | // has been parsed. |
| 34 | class OutputBuffer { | 34 | class DEMANGLE_ABI OutputBuffer { |
| 35 | char *Buffer = nullptr; | 35 | char *Buffer = nullptr; |
| 36 | size_t CurrentPosition = 0; | 36 | size_t CurrentPosition = 0; |
| 37 | size_t BufferCapacity = 0; | 37 | size_t BufferCapacity = 0; |
lib/libcxxabi/src/fallback_malloc.cpp+2-2| ... | @@ -35,9 +35,9 @@ namespace { | ... | @@ -35,9 +35,9 @@ namespace { |
| 35 | 35 | ||
| 36 | // When POSIX threads are not available, make the mutex operations a nop | 36 | // When POSIX threads are not available, make the mutex operations a nop |
| 37 | #ifndef _LIBCXXABI_HAS_NO_THREADS | 37 | #ifndef _LIBCXXABI_HAS_NO_THREADS |
| 38 | static _LIBCPP_CONSTINIT std::__libcpp_mutex_t heap_mutex = _LIBCPP_MUTEX_INITIALIZER; | 38 | static constinit std::__libcpp_mutex_t heap_mutex = _LIBCPP_MUTEX_INITIALIZER; |
| 39 | #else | 39 | #else |
| 40 | static _LIBCPP_CONSTINIT void* heap_mutex = 0; | 40 | static constinit void* heap_mutex = 0; |
| 41 | #endif | 41 | #endif |
| 42 | 42 | ||
| 43 | class mutexor { | 43 | class mutexor { |
lib/libcxxabi/src/private_typeinfo.cpp+18-20| ... | @@ -99,28 +99,27 @@ struct derived_object_info { | ... | @@ -99,28 +99,27 @@ struct derived_object_info { |
| 99 | }; | 99 | }; |
| 100 | 100 | ||
| 101 | /// A helper function that gets (dynamic_ptr, dynamic_type, offset_to_derived) from static_ptr. | 101 | /// A helper function that gets (dynamic_ptr, dynamic_type, offset_to_derived) from static_ptr. |
| 102 | void dyn_cast_get_derived_info(derived_object_info* info, const void* static_ptr) | 102 | derived_object_info dyn_cast_get_derived_info(const void* static_ptr) { |
| 103 | { | 103 | derived_object_info info; |
| 104 | #if __has_feature(cxx_abi_relative_vtable) | 104 | #if __has_feature(cxx_abi_relative_vtable) |
| 105 | // The vtable address will point to the first virtual function, which is 8 | 105 | // The vtable address will point to the first virtual function, which is 8 |
| 106 | // bytes after the start of the vtable (4 for the offset from top + 4 for | 106 | // bytes after the start of the vtable (4 for the offset from top + 4 for |
| 107 | // the typeinfo component). | 107 | // the typeinfo component). |
| 108 | const int32_t* vtable = | 108 | const int32_t* vtable = *reinterpret_cast<const int32_t* const*>(static_ptr); |
| 109 | *reinterpret_cast<const int32_t* const*>(static_ptr); | 109 | info.offset_to_derived = static_cast<std::ptrdiff_t>(vtable[-2]); |
| 110 | info->offset_to_derived = static_cast<std::ptrdiff_t>(vtable[-2]); | 110 | info.dynamic_ptr = static_cast<const char*>(static_ptr) + info.offset_to_derived; |
| 111 | info->dynamic_ptr = static_cast<const char*>(static_ptr) + info->offset_to_derived; | 111 | |
| 112 | 112 | // The typeinfo component is now a relative offset to a proxy. | |
| 113 | // The typeinfo component is now a relative offset to a proxy. | 113 | int32_t offset_to_ti_proxy = vtable[-1]; |
| 114 | int32_t offset_to_ti_proxy = vtable[-1]; | 114 | const uint8_t* ptr_to_ti_proxy = reinterpret_cast<const uint8_t*>(vtable) + offset_to_ti_proxy; |
| 115 | const uint8_t* ptr_to_ti_proxy = | 115 | info.dynamic_type = *(reinterpret_cast<const __class_type_info* const*>(ptr_to_ti_proxy)); |
| 116 | reinterpret_cast<const uint8_t*>(vtable) + offset_to_ti_proxy; | ||
| 117 | info->dynamic_type = *(reinterpret_cast<const __class_type_info* const*>(ptr_to_ti_proxy)); | ||
| 118 | #else | 116 | #else |
| 119 | void** vtable = strip_vtable(*static_cast<void** const*>(static_ptr)); | 117 | void** vtable = strip_vtable(*static_cast<void** const*>(static_ptr)); |
| 120 | info->offset_to_derived = reinterpret_cast<ptrdiff_t>(vtable[-2]); | 118 | info.offset_to_derived = reinterpret_cast<ptrdiff_t>(vtable[-2]); |
| 121 | info->dynamic_ptr = static_cast<const char*>(static_ptr) + info->offset_to_derived; | 119 | info.dynamic_ptr = static_cast<const char*>(static_ptr) + info.offset_to_derived; |
| 122 | info->dynamic_type = static_cast<const __class_type_info*>(vtable[-1]); | 120 | info.dynamic_type = static_cast<const __class_type_info*>(vtable[-1]); |
| 123 | #endif | 121 | #endif |
| 122 | return info; | ||
| 124 | } | 123 | } |
| 125 | 124 | ||
| 126 | /// A helper function for __dynamic_cast that casts a base sub-object pointer | 125 | /// A helper function for __dynamic_cast that casts a base sub-object pointer |
| ... | @@ -915,8 +914,7 @@ __dynamic_cast(const void *static_ptr, const __class_type_info *static_type, | ... | @@ -915,8 +914,7 @@ __dynamic_cast(const void *static_ptr, const __class_type_info *static_type, |
| 915 | const __class_type_info *dst_type, | 914 | const __class_type_info *dst_type, |
| 916 | std::ptrdiff_t src2dst_offset) { | 915 | std::ptrdiff_t src2dst_offset) { |
| 917 | // Get (dynamic_ptr, dynamic_type) from static_ptr | 916 | // Get (dynamic_ptr, dynamic_type) from static_ptr |
| 918 | derived_object_info derived_info; | 917 | derived_object_info derived_info = dyn_cast_get_derived_info(static_ptr); |
| 919 | dyn_cast_get_derived_info(&derived_info, static_ptr); | ||
| 920 | 918 | ||
| 921 | // Initialize answer to nullptr. This will be changed from the search | 919 | // Initialize answer to nullptr. This will be changed from the search |
| 922 | // results if a non-null answer is found. Regardless, this is what will | 920 | // results if a non-null answer is found. Regardless, this is what will |
lib/libcxxabi/src/private_typeinfo.h+3-3| ... | @@ -145,7 +145,7 @@ public: | ... | @@ -145,7 +145,7 @@ public: |
| 145 | // Has one non-virtual public base class at offset zero | 145 | // Has one non-virtual public base class at offset zero |
| 146 | class _LIBCXXABI_TYPE_VIS __si_class_type_info : public __class_type_info { | 146 | class _LIBCXXABI_TYPE_VIS __si_class_type_info : public __class_type_info { |
| 147 | public: | 147 | public: |
| 148 | const __class_type_info *__base_type; | 148 | _LIBCXXABI_DISABLE_POINTER_FIELD_PROTECTION const __class_type_info* __base_type; |
| 149 | 149 | ||
| 150 | _LIBCXXABI_HIDDEN virtual ~__si_class_type_info(); | 150 | _LIBCXXABI_HIDDEN virtual ~__si_class_type_info(); |
| 151 | 151 | ||
| ... | @@ -204,7 +204,7 @@ public: | ... | @@ -204,7 +204,7 @@ public: |
| 204 | class _LIBCXXABI_TYPE_VIS __pbase_type_info : public __shim_type_info { | 204 | class _LIBCXXABI_TYPE_VIS __pbase_type_info : public __shim_type_info { |
| 205 | public: | 205 | public: |
| 206 | unsigned int __flags; | 206 | unsigned int __flags; |
| 207 | const __shim_type_info *__pointee; | 207 | _LIBCXXABI_DISABLE_POINTER_FIELD_PROTECTION const __shim_type_info* __pointee; |
| 208 | 208 | ||
| 209 | enum __masks { | 209 | enum __masks { |
| 210 | __const_mask = 0x1, | 210 | __const_mask = 0x1, |
| ... | @@ -245,7 +245,7 @@ public: | ... | @@ -245,7 +245,7 @@ public: |
| 245 | class _LIBCXXABI_TYPE_VIS __pointer_to_member_type_info | 245 | class _LIBCXXABI_TYPE_VIS __pointer_to_member_type_info |
| 246 | : public __pbase_type_info { | 246 | : public __pbase_type_info { |
| 247 | public: | 247 | public: |
| 248 | const __class_type_info *__context; | 248 | _LIBCXXABI_DISABLE_POINTER_FIELD_PROTECTION const __class_type_info* __context; |
| 249 | 249 | ||
| 250 | _LIBCXXABI_HIDDEN virtual ~__pointer_to_member_type_info(); | 250 | _LIBCXXABI_HIDDEN virtual ~__pointer_to_member_type_info(); |
| 251 | _LIBCXXABI_HIDDEN virtual bool can_catch(const __shim_type_info *, | 251 | _LIBCXXABI_HIDDEN virtual bool can_catch(const __shim_type_info *, |
lib/libcxxabi/src/stdlib_new_delete.cpp+16-20| ... | @@ -20,10 +20,6 @@ | ... | @@ -20,10 +20,6 @@ |
| 20 | # error The _THROW_BAD_ALLOC macro should be already defined by libc++ | 20 | # error The _THROW_BAD_ALLOC macro should be already defined by libc++ |
| 21 | #endif | 21 | #endif |
| 22 | 22 | ||
| 23 | #ifndef _LIBCPP_WEAK | ||
| 24 | # error The _LIBCPP_WEAK macro should be already defined by libc++ | ||
| 25 | #endif | ||
| 26 | |||
| 27 | #if defined(_LIBCXXABI_NO_EXCEPTIONS) != !_LIBCPP_HAS_EXCEPTIONS | 23 | #if defined(_LIBCXXABI_NO_EXCEPTIONS) != !_LIBCPP_HAS_EXCEPTIONS |
| 28 | # error libc++ and libc++abi seem to disagree on whether exceptions are enabled | 24 | # error libc++ and libc++abi seem to disagree on whether exceptions are enabled |
| 29 | #endif | 25 | #endif |
| ... | @@ -70,7 +66,7 @@ OVERRIDABLE_FUNCTION void* operator new(std::size_t size) _THROW_BAD_ALLOC { | ... | @@ -70,7 +66,7 @@ OVERRIDABLE_FUNCTION void* operator new(std::size_t size) _THROW_BAD_ALLOC { |
| 70 | return p; | 66 | return p; |
| 71 | } | 67 | } |
| 72 | 68 | ||
| 73 | _LIBCPP_WEAK void* operator new(size_t size, const std::nothrow_t&) noexcept { | 69 | [[gnu::weak]] void* operator new(size_t size, const std::nothrow_t&) noexcept { |
| 74 | #if !_LIBCPP_HAS_EXCEPTIONS | 70 | #if !_LIBCPP_HAS_EXCEPTIONS |
| 75 | # if _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION | 71 | # if _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION |
| 76 | _LIBCPP_ASSERT_SHIM( | 72 | _LIBCPP_ASSERT_SHIM( |
| ... | @@ -96,7 +92,7 @@ _LIBCPP_WEAK void* operator new(size_t size, const std::nothrow_t&) noexcept { | ... | @@ -96,7 +92,7 @@ _LIBCPP_WEAK void* operator new(size_t size, const std::nothrow_t&) noexcept { |
| 96 | 92 | ||
| 97 | OVERRIDABLE_FUNCTION void* operator new[](size_t size) _THROW_BAD_ALLOC { return ::operator new(size); } | 93 | OVERRIDABLE_FUNCTION void* operator new[](size_t size) _THROW_BAD_ALLOC { return ::operator new(size); } |
| 98 | 94 | ||
| 99 | _LIBCPP_WEAK void* operator new[](size_t size, const std::nothrow_t&) noexcept { | 95 | [[gnu::weak]] void* operator new[](size_t size, const std::nothrow_t&) noexcept { |
| 100 | #if !_LIBCPP_HAS_EXCEPTIONS | 96 | #if !_LIBCPP_HAS_EXCEPTIONS |
| 101 | # if _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION | 97 | # if _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION |
| 102 | _LIBCPP_ASSERT_SHIM( | 98 | _LIBCPP_ASSERT_SHIM( |
| ... | @@ -120,17 +116,17 @@ _LIBCPP_WEAK void* operator new[](size_t size, const std::nothrow_t&) noexcept { | ... | @@ -120,17 +116,17 @@ _LIBCPP_WEAK void* operator new[](size_t size, const std::nothrow_t&) noexcept { |
| 120 | #endif | 116 | #endif |
| 121 | } | 117 | } |
| 122 | 118 | ||
| 123 | _LIBCPP_WEAK void operator delete(void* ptr) noexcept { std::free(ptr); } | 119 | [[gnu::weak]] void operator delete(void* ptr) noexcept { std::free(ptr); } |
| 124 | 120 | ||
| 125 | _LIBCPP_WEAK void operator delete(void* ptr, const std::nothrow_t&) noexcept { ::operator delete(ptr); } | 121 | [[gnu::weak]] void operator delete(void* ptr, const std::nothrow_t&) noexcept { ::operator delete(ptr); } |
| 126 | 122 | ||
| 127 | _LIBCPP_WEAK void operator delete(void* ptr, size_t) noexcept { ::operator delete(ptr); } | 123 | [[gnu::weak]] void operator delete(void* ptr, size_t) noexcept { ::operator delete(ptr); } |
| 128 | 124 | ||
| 129 | _LIBCPP_WEAK void operator delete[](void* ptr) noexcept { ::operator delete(ptr); } | 125 | [[gnu::weak]] void operator delete[](void* ptr) noexcept { ::operator delete(ptr); } |
| 130 | 126 | ||
| 131 | _LIBCPP_WEAK void operator delete[](void* ptr, const std::nothrow_t&) noexcept { ::operator delete[](ptr); } | 127 | [[gnu::weak]] void operator delete[](void* ptr, const std::nothrow_t&) noexcept { ::operator delete[](ptr); } |
| 132 | 128 | ||
| 133 | _LIBCPP_WEAK void operator delete[](void* ptr, size_t) noexcept { ::operator delete[](ptr); } | 129 | [[gnu::weak]] void operator delete[](void* ptr, size_t) noexcept { ::operator delete[](ptr); } |
| 134 | 130 | ||
| 135 | #if _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION | 131 | #if _LIBCPP_HAS_LIBRARY_ALIGNED_ALLOCATION |
| 136 | 132 | ||
| ... | @@ -161,7 +157,7 @@ OVERRIDABLE_FUNCTION void* operator new(std::size_t size, std::align_val_t align | ... | @@ -161,7 +157,7 @@ OVERRIDABLE_FUNCTION void* operator new(std::size_t size, std::align_val_t align |
| 161 | return p; | 157 | return p; |
| 162 | } | 158 | } |
| 163 | 159 | ||
| 164 | _LIBCPP_WEAK void* operator new(size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept { | 160 | [[gnu::weak]] void* operator new(size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept { |
| 165 | # if !_LIBCPP_HAS_EXCEPTIONS | 161 | # if !_LIBCPP_HAS_EXCEPTIONS |
| 166 | # if _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION | 162 | # if _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION |
| 167 | _LIBCPP_ASSERT_SHIM( | 163 | _LIBCPP_ASSERT_SHIM( |
| ... | @@ -189,7 +185,7 @@ OVERRIDABLE_FUNCTION void* operator new[](size_t size, std::align_val_t alignmen | ... | @@ -189,7 +185,7 @@ OVERRIDABLE_FUNCTION void* operator new[](size_t size, std::align_val_t alignmen |
| 189 | return ::operator new(size, alignment); | 185 | return ::operator new(size, alignment); |
| 190 | } | 186 | } |
| 191 | 187 | ||
| 192 | _LIBCPP_WEAK void* operator new[](size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept { | 188 | [[gnu::weak]] void* operator new[](size_t size, std::align_val_t alignment, const std::nothrow_t&) noexcept { |
| 193 | # if !_LIBCPP_HAS_EXCEPTIONS | 189 | # if !_LIBCPP_HAS_EXCEPTIONS |
| 194 | # if _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION | 190 | # if _LIBCPP_CAN_DETECT_OVERRIDDEN_FUNCTION |
| 195 | _LIBCPP_ASSERT_SHIM( | 191 | _LIBCPP_ASSERT_SHIM( |
| ... | @@ -213,25 +209,25 @@ _LIBCPP_WEAK void* operator new[](size_t size, std::align_val_t alignment, const | ... | @@ -213,25 +209,25 @@ _LIBCPP_WEAK void* operator new[](size_t size, std::align_val_t alignment, const |
| 213 | # endif | 209 | # endif |
| 214 | } | 210 | } |
| 215 | 211 | ||
| 216 | _LIBCPP_WEAK void operator delete(void* ptr, std::align_val_t) noexcept { std::__libcpp_aligned_free(ptr); } | 212 | [[gnu::weak]] void operator delete(void* ptr, std::align_val_t) noexcept { std::__libcpp_aligned_free(ptr); } |
| 217 | 213 | ||
| 218 | _LIBCPP_WEAK void operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept { | 214 | [[gnu::weak]] void operator delete(void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept { |
| 219 | ::operator delete(ptr, alignment); | 215 | ::operator delete(ptr, alignment); |
| 220 | } | 216 | } |
| 221 | 217 | ||
| 222 | _LIBCPP_WEAK void operator delete(void* ptr, size_t, std::align_val_t alignment) noexcept { | 218 | [[gnu::weak]] void operator delete(void* ptr, size_t, std::align_val_t alignment) noexcept { |
| 223 | ::operator delete(ptr, alignment); | 219 | ::operator delete(ptr, alignment); |
| 224 | } | 220 | } |
| 225 | 221 | ||
| 226 | _LIBCPP_WEAK void operator delete[](void* ptr, std::align_val_t alignment) noexcept { | 222 | [[gnu::weak]] void operator delete[](void* ptr, std::align_val_t alignment) noexcept { |
| 227 | ::operator delete(ptr, alignment); | 223 | ::operator delete(ptr, alignment); |
| 228 | } | 224 | } |
| 229 | 225 | ||
| 230 | _LIBCPP_WEAK void operator delete[](void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept { | 226 | [[gnu::weak]] void operator delete[](void* ptr, std::align_val_t alignment, const std::nothrow_t&) noexcept { |
| 231 | ::operator delete[](ptr, alignment); | 227 | ::operator delete[](ptr, alignment); |
| 232 | } | 228 | } |
| 233 | 229 | ||
| 234 | _LIBCPP_WEAK void operator delete[](void* ptr, size_t, std::align_val_t alignment) noexcept { | 230 | [[gnu::weak]] void operator delete[](void* ptr, size_t, std::align_val_t alignment) noexcept { |
| 235 | ::operator delete[](ptr, alignment); | 231 | ::operator delete[](ptr, alignment); |
| 236 | } | 232 | } |
| 237 | 233 |