diff options
author | Alexandre Ganea <alexandre.ganea@ubisoft.com> | 2020-02-11 10:17:15 -0500 |
---|---|---|
committer | Hans Wennborg <hans@chromium.org> | 2020-02-12 10:22:21 +0100 |
commit | fd04cb43e1d83c6f18c932de94c1e341272ed160 (patch) | |
tree | 0eccf00d27a17e3b8ece0a0a4d7eecd328b5d524 /llvm/lib/Support/ErrorHandling.cpp | |
parent | aeba7ba9f3dada09e196d174e7f13b82f01300db (diff) | |
download | bcm5719-llvm-fd04cb43e1d83c6f18c932de94c1e341272ed160.tar.gz bcm5719-llvm-fd04cb43e1d83c6f18c932de94c1e341272ed160.zip |
[Clang][Driver] After default -fintegrated-cc1, make llvm::report_fatal_error() generate preprocessed source + reproducer.sh again.
Added a test for #pragma clang __debug llvm_fatal_error to test for the original issue.
Added llvm::sys::Process::Exit() and replaced ::exit() in places where it was appropriate. This new function would call the current CrashRecoveryContext if one is running on the same thread; or call ::exit() otherwise.
Fixes PR44705.
Differential Revision: https://reviews.llvm.org/D73742
(cherry picked from commit faace365088a2a3a4cb1050a9facfc34a7a56577)
Diffstat (limited to 'llvm/lib/Support/ErrorHandling.cpp')
-rw-r--r-- | llvm/lib/Support/ErrorHandling.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp index 0f13f7a536f..a9463024c42 100644 --- a/llvm/lib/Support/ErrorHandling.cpp +++ b/llvm/lib/Support/ErrorHandling.cpp @@ -19,6 +19,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/Errc.h" #include "llvm/Support/Error.h" +#include "llvm/Support/Process.h" #include "llvm/Support/Signals.h" #include "llvm/Support/Threading.h" #include "llvm/Support/WindowsError.h" @@ -122,7 +123,7 @@ void llvm::report_fatal_error(const Twine &Reason, bool GenCrashDiag) { // files registered with RemoveFileOnSignal. sys::RunInterruptHandlers(); - exit(1); + sys::Process::Exit(1); } void llvm::install_bad_alloc_error_handler(fatal_error_handler_t handler, |