Don't use PrintFatalError(which calls exit) for 'Primary decode conflict'. Just skip emitting the table. This way the main function will delete the output file instead of it remaining empty and confusing dependency checks if build is invoked a second time.

llvm-svn: 198529
This commit is contained in:
Craig Topper 2014-01-05 01:34:12 +00:00
parent 34bac1f730
commit 7d4e01cdcb
1 changed files with 4 additions and 3 deletions

View File

@ -117,9 +117,10 @@ void EmitDisassembler(RecordKeeper &Records, raw_ostream &OS) {
for (unsigned i = 0, e = numberedInstructions.size(); i != e; ++i)
RecognizableInstr::processInstr(Tables, *numberedInstructions[i], i);
if (Tables.hasConflicts())
PrintFatalError(Target.getTargetRecord()->getLoc(),
"Primary decode conflict");
if (Tables.hasConflicts()) {
PrintError(Target.getTargetRecord()->getLoc(), "Primary decode conflict");
return;
}
Tables.emit(OS);
return;