aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Support/ErrorHandling.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-07-03 14:10:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-07-03 14:10:23 +0000
commit145449b1e420787bb99721a429341fa6be3adfb6 (patch)
tree1d56ae694a6de602e348dd80165cf881a36600ed /llvm/lib/Support/ErrorHandling.cpp
parentecbca9f5fb7d7613d2b94982c4825eb0d33d6842 (diff)
Diffstat (limited to 'llvm/lib/Support/ErrorHandling.cpp')
-rw-r--r--llvm/lib/Support/ErrorHandling.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp
index 80c0e00439a5..b8b3b7424ac6 100644
--- a/llvm/lib/Support/ErrorHandling.cpp
+++ b/llvm/lib/Support/ErrorHandling.cpp
@@ -119,7 +119,10 @@ void llvm::report_fatal_error(const Twine &Reason, bool GenCrashDiag) {
// files registered with RemoveFileOnSignal.
sys::RunInterruptHandlers();
- abort();
+ if (GenCrashDiag)
+ abort();
+ else
+ exit(1);
}
void llvm::install_bad_alloc_error_handler(fatal_error_handler_t handler,