mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-03-01 08:47:42 +00:00
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
This commit is contained in:
parent
fc667757e8
commit
6db000fe17
@ -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";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user