Skip to content

Commit

Permalink
fixing bug for loop with one parser state only (#3492)
Browse files Browse the repository at this point in the history
  • Loading branch information
VolodymyrPeschanenkoIntel authored Aug 29, 2022
1 parent df82c07 commit 2fa87f5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion midend/parserUnroll.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,10 @@ class ParserSymbolicInterpreter {

/// Gets new name for a state
IR::ID getNewName(ParserStateInfo* state) {
if (state->currentIndex == 0)
if (state->currentIndex == 0) {
structure->callsIndexes.emplace(state->state->name.name, 0);
return state->state->name;
}
return IR::ID(state->state->name + std::to_string(state->currentIndex));
}

Expand Down

0 comments on commit 2fa87f5

Please sign in to comment.