diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2025-04-05 01:46:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-05 01:46:13 -0400 |
| commit | 0cd31fc7ff157551cfbba5da35cd79f118d2a2e3 (patch) | |
| tree | a308488f5d85184c8ec402fb3f55f1cf2704443e /lib/libcxxabi/src/abort_message.cpp | |
| parent | 8acedfd5baabab705946ad097746f9183ef62420 (diff) | |
| parent | cefe65c1b8abe65a22d4b68410db1be264fdeda0 (diff) | |
| download | zig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.tar.gz zig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.zip | |
Merge pull request #22780 from ziglang/llvm20
LLVM 20
Diffstat (limited to 'lib/libcxxabi/src/abort_message.cpp')
| -rw-r--r-- | lib/libcxxabi/src/abort_message.cpp | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/libcxxabi/src/abort_message.cpp b/lib/libcxxabi/src/abort_message.cpp index 859a5031b9..d51d9d87d3 100644 --- a/lib/libcxxabi/src/abort_message.cpp +++ b/lib/libcxxabi/src/abort_message.cpp @@ -12,13 +12,8 @@ #include "abort_message.h" #ifdef __BIONIC__ -# include <android/api-level.h> -# if __ANDROID_API__ >= 21 -# include <syslog.h> - extern "C" void android_set_abort_message(const char* msg); -# else -# include <assert.h> -# endif // __ANDROID_API__ >= 21 +# include <syslog.h> +extern "C" void android_set_abort_message(const char* msg); #endif // __BIONIC__ #if defined(__APPLE__) && __has_include(<CrashReporterClient.h>) @@ -26,7 +21,7 @@ # define _LIBCXXABI_USE_CRASHREPORTER_CLIENT #endif -void abort_message(const char* format, ...) +void __abort_message(const char* format, ...) { // Write message to stderr. We do this before formatting into a // variable-size buffer so that we still get some information if @@ -59,7 +54,6 @@ void abort_message(const char* format, ...) vasprintf(&buffer, format, list); va_end(list); -# if __ANDROID_API__ >= 21 // Show error in tombstone. android_set_abort_message(buffer); @@ -67,12 +61,6 @@ void abort_message(const char* format, ...) openlog("libc++abi", 0, 0); syslog(LOG_CRIT, "%s", buffer); closelog(); -# else - // The good error reporting wasn't available in Android until L. Since we're - // about to abort anyway, just call __assert2, which will log _somewhere_ - // (tombstone and/or logcat) in older releases. - __assert2(__FILE__, __LINE__, __func__, buffer); -# endif // __ANDROID_API__ >= 21 #endif // __BIONIC__ abort(); |
