summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrendon Cahoon <bcahoon@codeaurora.org>2012-02-03 21:08:25 +0000
committerBrendon Cahoon <bcahoon@codeaurora.org>2012-02-03 21:08:25 +0000
commite9b60aaf1c23f92cb881a07aacc16d2987c7fb6c (patch)
treec13ccf841011590d932f1c0a941db44f76dbb7c3
parentaaa55a88b628e85deff18f9bcf6991769472afc9 (diff)
downloadbcm5719-llvm-e9b60aaf1c23f92cb881a07aacc16d2987c7fb6c.tar.gz
bcm5719-llvm-e9b60aaf1c23f92cb881a07aacc16d2987c7fb6c.zip
Increment DFAStateEntryTable index for sentinel entry.
When adding the {-1, -1} entry to the DFAStateInputTable, we need to increment the index used to populate the DFAStateEntryTable. Otherwise, the entry table will be off by one for each transition after the {-1, -1} entry. PR11908. llvm-svn: 149713
-rw-r--r--llvm/utils/TableGen/DFAPacketizerEmitter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/DFAPacketizerEmitter.cpp b/llvm/utils/TableGen/DFAPacketizerEmitter.cpp
index 2862d0cefc1..5721121dd73 100644
--- a/llvm/utils/TableGen/DFAPacketizerEmitter.cpp
+++ b/llvm/utils/TableGen/DFAPacketizerEmitter.cpp
@@ -311,8 +311,10 @@ void DFA::writeTableAndAPI(raw_ostream &OS, const std::string &TargetName) {
// If there are no valid transitions from this stage, we need a sentinel
// transition.
- if (ValidTransitions == StateEntry[i])
+ if (ValidTransitions == StateEntry[i]) {
OS << "{-1, -1},";
+ ++ValidTransitions;
+ }
OS << "\n";
}
OpenPOWER on IntegriCloud