[compiler-rt] Log errno (or fuchsia equivalent) on map failures (PR #95391)
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 26 03:49:59 PDT 2024
================
@@ -16,4 +19,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(buffer_size));
+ 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