Fix tablegen's PrintFatalError function to run registered file
[oota-llvm.git] / utils / TableGen / InstrInfoEmitter.cpp
index f999326bc9722e57a51996368f8b6021673b2b78..d007c1d390713215582cbbc66211d2cb6e6cea07 100644 (file)
@@ -575,10 +575,8 @@ void InstrInfoEmitter::emitEnums(raw_ostream &OS) {
   // We must emit the PHI opcode first...
   std::string Namespace = Target.getInstNamespace();
 
-  if (Namespace.empty()) {
-    fprintf(stderr, "No instructions defined!\n");
-    exit(1);
-  }
+  if (Namespace.empty())
+    PrintFatalError("No instructions defined!");
 
   const std::vector<const CodeGenInstruction*> &NumberedInstructions =
     Target.getInstructionsByEnumValue();