[compiler-rt] Log errno (or fuchsia equivalent) on map failures (PR #95391)

Fabio D'Urso via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 08:05:11 PDT 2024


================
@@ -16,4 +19,14 @@ void die(const char *Message) {
   __sanitizer_log_write(Message, strlen(Message));
   __builtin_trap();
 }
+
+void dieWithErrorCode(const char *Message, int64_t ErrorCode) {
+  const char *error_str =
+      zx_status_get_string(static_cast<zx_status_t>(ErrorCode));
----------------
fabio-d wrote:

Please use the underscore-prefixed variant `_zx_status_get_string` instead

https://github.com/llvm/llvm-project/pull/95391


More information about the llvm-commits mailing list