mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-04 01:43:06 +00:00
Don't save an iterator, just use post-increment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
37d8bd92a2
commit
57646ec44e
@ -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;
|
||||
}
|
||||
|
@ -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
Block a user