diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-09-19 14:37:46 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-19 14:37:46 -0700 |
| commit | a63a1c5cb9fd31a57e8371e6cba5f316bd3f2a65 (patch) | |
| tree | 86c229e453d1f09734d6c89d172a471675aa7478 /lib/libcxx/src/system_error.cpp | |
| parent | ee4ced96833470f9432e6a5dc5b31534457280c0 (diff) | |
| parent | f9f9c4a083b4e268caac3feff3a848df7a4f17cb (diff) | |
| download | zig-a63a1c5cb9fd31a57e8371e6cba5f316bd3f2a65.tar.gz zig-a63a1c5cb9fd31a57e8371e6cba5f316bd3f2a65.zip | |
Merge pull request #17202 from ziglang/llvm17
Update to LLVM 17
Diffstat (limited to 'lib/libcxx/src/system_error.cpp')
| -rw-r--r-- | lib/libcxx/src/system_error.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/libcxx/src/system_error.cpp b/lib/libcxx/src/system_error.cpp index ba5fa8f30b..7875f59d88 100644 --- a/lib/libcxx/src/system_error.cpp +++ b/lib/libcxx/src/system_error.cpp @@ -12,6 +12,7 @@ #endif #include <__assert> +#include <__verbose_abort> #include <cerrno> #include <cstdio> #include <cstdlib> @@ -103,7 +104,7 @@ handle_strerror_r_return(int strerror_return, char *buffer) { if (new_errno == EINVAL) return ""; - _LIBCPP_ASSERT(new_errno == ERANGE, "unexpected error from ::strerror_r"); + _LIBCPP_ASSERT_UNCATEGORIZED(new_errno == ERANGE, "unexpected error from ::strerror_r"); // FIXME maybe? 'strerror_buff_size' is likely to exceed the // maximum error size so ERANGE shouldn't be returned. std::abort(); @@ -286,12 +287,10 @@ system_error::~system_error() noexcept void __throw_system_error(int ev, const char* what_arg) { -#ifndef _LIBCPP_NO_EXCEPTIONS +#ifndef _LIBCPP_HAS_NO_EXCEPTIONS throw system_error(error_code(ev, system_category()), what_arg); #else - (void)ev; - (void)what_arg; - _VSTD::abort(); + _LIBCPP_VERBOSE_ABORT("system_error was thrown in -fno-exceptions mode with error %i and message \"%s\"", ev, what_arg); #endif } |
