diff options
author | David Goodwin <david_goodwin@apple.com> | 2009-09-24 20:22:50 +0000 |
---|---|---|
committer | David Goodwin <david_goodwin@apple.com> | 2009-09-24 20:22:50 +0000 |
commit | 1f528956921561f277a8c697e0202ac1e9a9c1d5 (patch) | |
tree | 706a95e33cb48eb7e8b14c4f8597d7e5ee097026 /utils/TableGen/SubtargetEmitter.cpp | |
parent | 3c98fefa354a2d75d5c3c588e3f65ec154278490 (diff) | |
download | llvm-1f528956921561f277a8c697e0202ac1e9a9c1d5.tar.gz llvm-1f528956921561f277a8c697e0202ac1e9a9c1d5.tar.bz2 llvm-1f528956921561f277a8c697e0202ac1e9a9c1d5.tar.xz |
Make the end-of-itinerary mark explicit. Some cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82709 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/SubtargetEmitter.cpp')
-rw-r--r-- | utils/TableGen/SubtargetEmitter.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp index 9760b171dd..c8cf234ca4 100644 --- a/utils/TableGen/SubtargetEmitter.cpp +++ b/utils/TableGen/SubtargetEmitter.cpp @@ -413,7 +413,7 @@ void SubtargetEmitter::EmitProcessorData(raw_ostream &OS, // For each itinerary class std::vector<InstrItinerary> &ItinList = *ProcListIter++; - for (unsigned j = 0, M = ItinList.size(); j < M;) { + for (unsigned j = 0, M = ItinList.size(); j < M; ++j) { InstrItinerary &Intinerary = ItinList[j]; // Emit in the form of @@ -427,13 +427,11 @@ void SubtargetEmitter::EmitProcessorData(raw_ostream &OS, Intinerary.LastOperandCycle << " }"; } - // If more in list add comma - if (++j < M) OS << ","; - - OS << " // " << (j - 1) << "\n"; + OS << ", // " << j << "\n"; } // End processor itinerary table + OS << " { ~0U, ~0U, ~0U, ~0U } // end marker\n"; OS << "};\n"; } } |