aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/src/system_error.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-09-19 14:37:46 -0700
committerGitHub <noreply@github.com>2023-09-19 14:37:46 -0700
commita63a1c5cb9fd31a57e8371e6cba5f316bd3f2a65 (patch)
tree86c229e453d1f09734d6c89d172a471675aa7478 /lib/libcxx/src/system_error.cpp
parentee4ced96833470f9432e6a5dc5b31534457280c0 (diff)
parentf9f9c4a083b4e268caac3feff3a848df7a4f17cb (diff)
downloadzig-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.cpp9
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
}