Simplify some printing code by combining new lines onto previous strings. Don't work...
authorCraig Topper <craig.topper@gmail.com>
Thu, 9 Apr 2015 04:08:46 +0000 (04:08 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 9 Apr 2015 04:08:46 +0000 (04:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234464 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/X86DisassemblerTables.cpp

index 9d55d1427f785318c2737c614aec28309aad5d8f..bc17b9b9785f8c6df72bea8efb518bb4d0eb1b86 100644 (file)
@@ -633,7 +633,7 @@ void DisassemblerTables::emitInstructionInfo(raw_ostream &o,
   i++;
 
   for (unsigned index = 0; index < NumInstructions; ++index) {
-    o.indent(i * 2) << "{ /* " << index << " */" << "\n";
+    o.indent(i * 2) << "{ /* " << index << " */\n";
     i++;
 
     OperandListTy OperandList;
@@ -647,16 +647,10 @@ void DisassemblerTables::emitInstructionInfo(raw_ostream &o,
     }
     o.indent(i * 2) << (OperandSets[OperandList] - 1) << ",\n";
 
-    o.indent(i * 2) << "/* " << InstructionSpecifiers[index].name << " */";
-    o << "\n";
+    o.indent(i * 2) << "/* " << InstructionSpecifiers[index].name << " */\n";
 
     i--;
-    o.indent(i * 2) << "}";
-
-    if (index + 1 < NumInstructions)
-      o << ",";
-
-    o << "\n";
+    o.indent(i * 2) << "},\n";
   }
 
   i--;