[llvm-commits] [llvm] r103334 - /llvm/trunk/lib/Support/ErrorHandling.cpp
Daniel Dunbar
daniel at zuster.org
Fri May 7 19:10:36 PDT 2010
Author: ddunbar
Date: Fri May 7 21:10:36 2010
New Revision: 103334
URL: http://llvm.org/viewvc/llvm-project?rev=103334&view=rev
Log:
Run interrupt routines as part of report_fatal_error, since we are failing
ungracefully.
Modified:
llvm/trunk/lib/Support/ErrorHandling.cpp
Modified: llvm/trunk/lib/Support/ErrorHandling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ErrorHandling.cpp?rev=103334&r1=103333&r2=103334&view=diff
==============================================================================
--- llvm/trunk/lib/Support/ErrorHandling.cpp (original)
+++ llvm/trunk/lib/Support/ErrorHandling.cpp Fri May 7 21:10:36 2010
@@ -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 <cassert>
#include <cstdlib>
@@ -52,6 +53,12 @@
} 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);
}
More information about the llvm-commits
mailing list