[llvm] r234464 - Simplify some printing code by combining new lines onto previous strings. Don't work so hard not to print a comma on the last entry of an array.
Craig Topper
craig.topper at gmail.com
Wed Apr 8 21:08:46 PDT 2015
Author: ctopper
Date: Wed Apr 8 23:08:46 2015
New Revision: 234464
URL: http://llvm.org/viewvc/llvm-project?rev=234464&view=rev
Log:
Simplify some printing code by combining new lines onto previous strings. Don't work so hard not to print a comma on the last entry of an array.
Modified:
llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp
Modified: llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp?rev=234464&r1=234463&r2=234464&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp (original)
+++ llvm/trunk/utils/TableGen/X86DisassemblerTables.cpp Wed Apr 8 23:08:46 2015
@@ -633,7 +633,7 @@ void DisassemblerTables::emitInstruction
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::emitInstruction
}
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--;
More information about the llvm-commits
mailing list