From abdf259d487163e72081a8cf4991b1617206b41e Mon Sep 17 00:00:00 2001 From: Roman Divacky Date: Thu, 27 May 2010 15:15:58 +0000 Subject: Update LLVM to r104832. --- lib/Support/ErrorHandling.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'lib/Support/ErrorHandling.cpp') diff --git a/lib/Support/ErrorHandling.cpp b/lib/Support/ErrorHandling.cpp index 56a171cb7d374..7e7ca9debe9a7 100644 --- a/lib/Support/ErrorHandling.cpp +++ b/lib/Support/ErrorHandling.cpp @@ -16,6 +16,7 @@ #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/System/Signals.h" #include "llvm/System/Threading.h" #include #include @@ -52,6 +53,12 @@ void llvm::report_fatal_error(const Twine &reason) { } else { ErrorHandler(ErrorHandlerUserData, reason.str()); } + + // 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(); + exit(1); } -- cgit v1.2.3