[cfe-commits] r167741 - /cfe/trunk/tools/driver/cc1_main.cpp
Chad Rosier
mcrosier at apple.com
Mon Nov 12 11:39:37 PST 2012
Author: mcrosier
Date: Mon Nov 12 13:39:37 2012
New Revision: 167741
URL: http://llvm.org/viewvc/llvm-project?rev=167741&view=rev
Log:
If we encounter a fatal error, call the interrupt handler to ensure any
temporary files are removed.
rdar://12282296
Modified:
cfe/trunk/tools/driver/cc1_main.cpp
Modified: cfe/trunk/tools/driver/cc1_main.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/driver/cc1_main.cpp?rev=167741&r1=167740&r2=167741&view=diff
==============================================================================
--- cfe/trunk/tools/driver/cc1_main.cpp (original)
+++ cfe/trunk/tools/driver/cc1_main.cpp Mon Nov 12 13:39:37 2012
@@ -27,6 +27,7 @@
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/ManagedStatic.h"
+#include "llvm/Support/Signals.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
@@ -43,6 +44,10 @@
Diags.Report(diag::err_fe_error_backend) << Message;
+ // Run the interrupt handlers to make sure any special cleanups get done, in
+ // particular that we remove files registered with RemoveFileOnSignal.
+ llvm::sys::RunInterruptHandlers();
+
// We cannot recover from llvm errors.
exit(1);
}
More information about the cfe-commits
mailing list