Skip to content

Commit e66d20d

Browse files
committed
Simply iterator
1 parent 2769a3f commit e66d20d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/CGData/StableFunctionMap.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static void removeIdenticalIndexPair(
118118
}
119119

120120
void StableFunctionMap::finalize() {
121-
for (auto It = HashToFuncs.begin(); It != HashToFuncs.end();) {
121+
for (auto It = HashToFuncs.begin(); It != HashToFuncs.end(); ++It) {
122122
auto &[StableHash, SFS] = *It;
123123

124124
// Group stable functions by ModuleIdentifier.
@@ -154,14 +154,13 @@ void StableFunctionMap::finalize() {
154154
}
155155
}
156156
if (Invalid) {
157-
HashToFuncs.erase(It++);
157+
HashToFuncs.erase(It);
158158
continue;
159159
}
160160

161161
// Trim the index pair that has the same operand hash across
162162
// stable functions.
163163
removeIdenticalIndexPair(SFS);
164-
++It;
165164
}
166165

167166
Finalized = true;

0 commit comments

Comments
 (0)