Don't save an iterator, just use post-increment.

llvm-svn: 17981
This commit is contained in:
Reid Spencer 2004-11-19 03:44:10 +00:00
parent 6abd4457e7
commit fc9f779039
1 changed files with 2 additions and 4 deletions

View File

@ -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;
}