forked from OSchip/llvm-project
Don't save an iterator, just use post-increment.
llvm-svn: 17981
This commit is contained in:
parent
6abd4457e7
commit
fc9f779039
|
@ -472,10 +472,8 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
|
|||
result.insert(mp);
|
||||
|
||||
// Remove the symbol now that its been resolved, being careful to
|
||||
// not invalidate our iterator.
|
||||
std::set<std::string>::iterator save = I;
|
||||
++I;
|
||||
symbols.erase(save);
|
||||
// post-increment the iterator.
|
||||
symbols.erase(I++);
|
||||
} else {
|
||||
++I;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue