summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/X86DisassemblerTables.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-04-09 04:08:46 +0000
committerCraig Topper <craig.topper@gmail.com>2015-04-09 04:08:46 +0000
commit34136874fd5bc58c95d5f91467c2a44f1df70f57 (patch)
tree976aaefe42397b9207b9e7d82ddc95e69198b1cf /llvm/utils/TableGen/X86DisassemblerTables.cpp
parentd434e395576a064160c85a91bb5f05853a48aaa1 (diff)
downloadbcm5719-llvm-34136874fd5bc58c95d5f91467c2a44f1df70f57.tar.gz
bcm5719-llvm-34136874fd5bc58c95d5f91467c2a44f1df70f57.zip
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.
llvm-svn: 234464
Diffstat (limited to 'llvm/utils/TableGen/X86DisassemblerTables.cpp')
-rw-r--r--llvm/utils/TableGen/X86DisassemblerTables.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/llvm/utils/TableGen/X86DisassemblerTables.cpp b/llvm/utils/TableGen/X86DisassemblerTables.cpp
index 9d55d1427f7..bc17b9b9785 100644
--- a/llvm/utils/TableGen/X86DisassemblerTables.cpp
+++ b/llvm/utils/TableGen/X86DisassemblerTables.cpp
@@ -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--;
OpenPOWER on IntegriCloud