mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
[upstream_utils] Upgrade to LLVM 20.1.7 (#8033)
Also removes xxhash, Hashing, and MapVector to reduce the size of the patches and to speed up compile times by a smidge.
This commit is contained in:
46
upstream_utils/llvm_patches/0022-OS-specific-changes.patch
Normal file
46
upstream_utils/llvm_patches/0022-OS-specific-changes.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: PJ Reiniger <pj.reiniger@gmail.com>
|
||||
Date: Sun, 8 May 2022 19:30:43 -0400
|
||||
Subject: [PATCH 22/36] OS-specific changes
|
||||
|
||||
---
|
||||
llvm/lib/Support/ErrorHandling.cpp | 16 +++++++---------
|
||||
1 file changed, 7 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp
|
||||
index 6c2b1c433285d2ec5d124f96919ff27f3328d74c..05e7ee1d125bdd6ce9a8f0db97d4feed3832a7ba 100644
|
||||
--- a/llvm/lib/Support/ErrorHandling.cpp
|
||||
+++ b/llvm/lib/Support/ErrorHandling.cpp
|
||||
@@ -96,15 +96,7 @@ void llvm::report_fatal_error(std::string_view Reason, bool GenCrashDiag) {
|
||||
wpi::print(stderr, "LLVM ERROR: {}\n", Reason);
|
||||
}
|
||||
|
||||
- // If we reached here, we are failing ungracefully. Run the interrupt handlers
|
||||
- // to make sure any special cleanups get done, in particular that we remove
|
||||
- // files registered with RemoveFileOnSignal.
|
||||
- sys::RunInterruptHandlers();
|
||||
-
|
||||
- if (GenCrashDiag)
|
||||
- abort();
|
||||
- else
|
||||
- exit(1);
|
||||
+ exit(1);
|
||||
}
|
||||
|
||||
void llvm::install_bad_alloc_error_handler(fatal_error_handler_t handler,
|
||||
@@ -142,9 +134,15 @@ void llvm::report_bad_alloc_error(const char *Reason, bool GenCrashDiag) {
|
||||
// an OOM to stderr and abort.
|
||||
const char *OOMMessage = "LLVM ERROR: out of memory\n";
|
||||
const char *Newline = "\n";
|
||||
+#ifdef _WIN32
|
||||
+ (void)!::_write(2, OOMMessage, strlen(OOMMessage));
|
||||
+ (void)!::_write(2, Reason, strlen(Reason));
|
||||
+ (void)!::_write(2, Newline, strlen(Newline));
|
||||
+#else
|
||||
(void)!::write(2, OOMMessage, strlen(OOMMessage));
|
||||
(void)!::write(2, Reason, strlen(Reason));
|
||||
(void)!::write(2, Newline, strlen(Newline));
|
||||
+#endif
|
||||
abort();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user