aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorDavid Goodwin <david_goodwin@apple.com>2009-09-24 20:22:50 +0000
committerDavid Goodwin <david_goodwin@apple.com>2009-09-24 20:22:50 +0000
commited17499ee7446c5da5638f6c4c34eea660808a3d (patch)
tree706a95e33cb48eb7e8b14c4f8597d7e5ee097026 /utils
parent7f3103731c7d2ee3608f401031d0b9f785293e35 (diff)
downloadexternal_llvm-ed17499ee7446c5da5638f6c4c34eea660808a3d.zip
external_llvm-ed17499ee7446c5da5638f6c4c34eea660808a3d.tar.gz
external_llvm-ed17499ee7446c5da5638f6c4c34eea660808a3d.tar.bz2
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')
-rw-r--r--utils/TableGen/SubtargetEmitter.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/TableGen/SubtargetEmitter.cpp b/utils/TableGen/SubtargetEmitter.cpp
index 9760b17..c8cf234 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";
}
}