mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Fix tablegen's PrintFatalError function to run registered file
cleanups. Also, change code in tablegen which printed a message and then called "exit(1)" to use PrintFatalError, instead. This fixes instances where an empty output file was left behind after a failed tablegen invocation, which would confuse subsequent ninja runs into not attempting to rebuild. Differential Revision: http://reviews.llvm.org/D9608 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237058 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
|
||||
#include "llvm/TableGen/Error.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/Support/Signals.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <cstdlib>
|
||||
|
||||
@ -64,11 +65,15 @@ void PrintError(const Twine &Msg) {
|
||||
|
||||
void PrintFatalError(const Twine &Msg) {
|
||||
PrintError(Msg);
|
||||
// The following call runs the file cleanup handlers.
|
||||
sys::RunInterruptHandlers();
|
||||
std::exit(1);
|
||||
}
|
||||
|
||||
void PrintFatalError(ArrayRef<SMLoc> ErrorLoc, const Twine &Msg) {
|
||||
PrintError(ErrorLoc, Msg);
|
||||
// The following call runs the file cleanup handlers.
|
||||
sys::RunInterruptHandlers();
|
||||
std::exit(1);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user