Rename createEmitter to run because eventually all tablegen backends will
be subclasses of a common interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7445 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/support/tools/TableGen/CodeEmitterGen.cpp b/support/tools/TableGen/CodeEmitterGen.cpp
index 8805c7c..25bbe5b 100644
--- a/support/tools/TableGen/CodeEmitterGen.cpp
+++ b/support/tools/TableGen/CodeEmitterGen.cpp
@@ -2,7 +2,7 @@
 #include "Record.h"
 #include "CodeEmitterGen.h"
 
-int CodeEmitterGen::createEmitter(std::ostream &o) {
+bool CodeEmitterGen::run(std::ostream &o) {
   std::vector<Record*> Insts;
 
   const std::map<std::string, Record*> &Defs = Records.getDefs();
@@ -33,7 +33,7 @@
     const RecordVal *InstVal = R->getValue("Inst");
     if (!InstVal) {
       std::cerr << "No 'Inst' record found in target description file!\n";
-      return 1;
+      return true;
     }
 
     Init *InitVal = InstVal->getValue();
@@ -229,5 +229,5 @@
     << "  }\n"
     << "  return Value;\n"
     << "}\n";
-  return 0;
+  return false;
 }
diff --git a/support/tools/TableGen/CodeEmitterGen.h b/support/tools/TableGen/CodeEmitterGen.h
index 7b3d201..60f11de 100644
--- a/support/tools/TableGen/CodeEmitterGen.h
+++ b/support/tools/TableGen/CodeEmitterGen.h
@@ -14,7 +14,8 @@
 public:
   CodeEmitterGen(RecordKeeper &R) : Records(R) {}
   
-  int createEmitter(std::ostream &o);
+  // run - Output the code emitter, returning true on failure.
+  bool run(std::ostream &o);
 private:
   void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace);
   void emitGetValueBit(std::ostream &o, const std::string &Namespace);
diff --git a/support/tools/TableGen/TableGen.cpp b/support/tools/TableGen/TableGen.cpp
index 70d2ef9..922ebbc 100644
--- a/support/tools/TableGen/TableGen.cpp
+++ b/support/tools/TableGen/TableGen.cpp
@@ -402,7 +402,7 @@
   switch (Action) {
   case Parse: ParseMachineCode(); break;
   case GenEmitter:
-    ErrorCode = CodeEmitterGen(Records).createEmitter(*Out);
+    ErrorCode = CodeEmitterGen(Records).run(*Out);
     break;
   case PrintRecords:
     *Out << Records;           // No argument, dump all contents
diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp
index 8805c7c..25bbe5b 100644
--- a/utils/TableGen/CodeEmitterGen.cpp
+++ b/utils/TableGen/CodeEmitterGen.cpp
@@ -2,7 +2,7 @@
 #include "Record.h"
 #include "CodeEmitterGen.h"
 
-int CodeEmitterGen::createEmitter(std::ostream &o) {
+bool CodeEmitterGen::run(std::ostream &o) {
   std::vector<Record*> Insts;
 
   const std::map<std::string, Record*> &Defs = Records.getDefs();
@@ -33,7 +33,7 @@
     const RecordVal *InstVal = R->getValue("Inst");
     if (!InstVal) {
       std::cerr << "No 'Inst' record found in target description file!\n";
-      return 1;
+      return true;
     }
 
     Init *InitVal = InstVal->getValue();
@@ -229,5 +229,5 @@
     << "  }\n"
     << "  return Value;\n"
     << "}\n";
-  return 0;
+  return false;
 }
diff --git a/utils/TableGen/CodeEmitterGen.h b/utils/TableGen/CodeEmitterGen.h
index 7b3d201..60f11de 100644
--- a/utils/TableGen/CodeEmitterGen.h
+++ b/utils/TableGen/CodeEmitterGen.h
@@ -14,7 +14,8 @@
 public:
   CodeEmitterGen(RecordKeeper &R) : Records(R) {}
   
-  int createEmitter(std::ostream &o);
+  // run - Output the code emitter, returning true on failure.
+  bool run(std::ostream &o);
 private:
   void emitMachineOpEmitter(std::ostream &o, const std::string &Namespace);
   void emitGetValueBit(std::ostream &o, const std::string &Namespace);
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp
index 70d2ef9..922ebbc 100644
--- a/utils/TableGen/TableGen.cpp
+++ b/utils/TableGen/TableGen.cpp
@@ -402,7 +402,7 @@
   switch (Action) {
   case Parse: ParseMachineCode(); break;
   case GenEmitter:
-    ErrorCode = CodeEmitterGen(Records).createEmitter(*Out);
+    ErrorCode = CodeEmitterGen(Records).run(*Out);
     break;
   case PrintRecords:
     *Out << Records;           // No argument, dump all contents