[llvm] r198529 - 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.

Craig Topper craig.topper at gmail.com
Sat Jan 4 17:34:12 PST 2014


Author: ctopper
Date: Sat Jan  4 19:34:12 2014
New Revision: 198529

URL: http://llvm.org/viewvc/llvm-project?rev=198529&view=rev
Log:
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.

Modified:
    llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp

Modified: llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp?rev=198529&r1=198528&r2=198529&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/DisassemblerEmitter.cpp Sat Jan  4 19:34:12 2014
@@ -117,9 +117,10 @@ void EmitDisassembler(RecordKeeper &Reco
     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;





More information about the llvm-commits mailing list