mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 15:39:06 +00:00
Run interrupt routines as part of report_fatal_error, since we are failing
ungracefully. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103334 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fb89e08413
commit
d547708976
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user