summaryrefslogtreecommitdiff
path: root/utils
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
commitffbd0715fa0dd5dd2611cd5cea9f7e5516ba9f5f (patch)
tree9ba8ffdbbddb7d3850fbde2df70d76ca1ea93fd5 /utils
parent7ccb30b5964675a70559ec25a6bff32f7dea1025 (diff)
downloadllvm-ffbd0715fa0dd5dd2611cd5cea9f7e5516ba9f5f.tar.gz
llvm-ffbd0715fa0dd5dd2611cd5cea9f7e5516ba9f5f.tar.bz2
llvm-ffbd0715fa0dd5dd2611cd5cea9f7e5516ba9f5f.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149713 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/DFAPacketizerEmitter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/TableGen/DFAPacketizerEmitter.cpp b/utils/TableGen/DFAPacketizerEmitter.cpp
index 2862d0cefc..5721121dd7 100644
--- a/utils/TableGen/DFAPacketizerEmitter.cpp
+++ b/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";
}