Dead code elimination


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7468 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp
index 90169e8..218797b 100644
--- a/utils/TableGen/TableGen.cpp
+++ b/utils/TableGen/TableGen.cpp
@@ -402,6 +402,9 @@
 
   try {
     switch (Action) {
+    case PrintRecords:
+      *Out << Records;           // No argument, dump all contents
+      break;
     case Parse:
       ParseMachineCode();
       break;
@@ -414,18 +417,8 @@
     case GenRegisterHeader:
       RegisterInfoEmitter(Records).runHeader(*Out);
       break;
-    case PrintRecords:
-      *Out << Records;           // No argument, dump all contents
-      break;
     case PrintEnums:
-      Record *R = Records.getClass(Class);
-      if (R == 0) {
-        std::cerr << "Cannot find class '" << Class << "'!\n";
-        abort();
-      }
-      
       std::vector<Record*> Recs = Records.getAllDerivedDefinitions(Class);
-
       for (unsigned i = 0, e = Recs.size(); i != e; ++i)
         *Out << Recs[i] << ", ";
       *Out << "\n";