[compiler-rt] Log errno (or fuchsia equivalent) on map failures (PR #95391)
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 14 10:28:46 PDT 2024
================
@@ -16,4 +18,13 @@ void die(const char *Message) {
__sanitizer_log_write(Message, strlen(Message));
__builtin_trap();
}
+
+void dieWithErrorCode(const char *Message, int64_t ErrorCode) {
+ size_t buffer_size = strlen(Message) + 48;
+ char *buffer = static_cast<char *>(alloca(strlen(Message) + 48));
+ snprintf(buffer, buffer_size, "%s (Error Code: %" PRId64 ")", Message,
----------------
hctim wrote:
done
https://github.com/llvm/llvm-project/pull/95391
More information about the llvm-commits
mailing list