mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-01 21:04:04 -04:00
[Automaton] Fix invalid iterator reference
Found by the expensive checks bot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373763 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -94,9 +94,8 @@ private:
|
||||
// Iterate over all existing heads. We will mutate the Heads deque during
|
||||
// iteration.
|
||||
unsigned NumHeads = Heads.size();
|
||||
for (auto HeadI = Heads.begin(), HeadE = std::next(Heads.begin(), NumHeads);
|
||||
HeadI != HeadE; ++HeadI) {
|
||||
PathSegment *Head = *HeadI;
|
||||
for (unsigned I = 0; I < NumHeads; ++I) {
|
||||
PathSegment *Head = Heads[I];
|
||||
// The sequence of pairs is sorted. Select the set of pairs that
|
||||
// transition from the current head state.
|
||||
auto PI = lower_bound(Pairs, NfaStatePair{Head->State, 0ULL});
|
||||
|
||||
Reference in New Issue
Block a user