diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-05-08 02:10:36 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-05-08 02:10:36 +0000 |
commit | 401d4c9341252ce70c568b30b4c21e73b441f279 (patch) | |
tree | aaff2881c412d39283ad8131c9477382dc5362d8 /llvm/lib/Support/ErrorHandling.cpp | |
parent | 68272566c6fc5e14f00516bd2890fcc3ac433c2d (diff) | |
download | bcm5719-llvm-401d4c9341252ce70c568b30b4c21e73b441f279.tar.gz bcm5719-llvm-401d4c9341252ce70c568b30b4c21e73b441f279.zip |
Run interrupt routines as part of report_fatal_error, since we are failing
ungracefully.
llvm-svn: 103334
Diffstat (limited to 'llvm/lib/Support/ErrorHandling.cpp')
-rw-r--r-- | llvm/lib/Support/ErrorHandling.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/lib/Support/ErrorHandling.cpp b/llvm/lib/Support/ErrorHandling.cpp index 56a171cb7d3..7e7ca9debe9 100644 --- a/llvm/lib/Support/ErrorHandling.cpp +++ b/llvm/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 <cassert> #include <cstdlib> @@ -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); } |