mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-26 21:32:10 +00:00
Avoid using an invalidated iterator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148681 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
603d6b56a2
commit
4254df3062
@ -572,7 +572,11 @@ Archive::findModulesDefiningSymbols(std::set<std::string>& symbols,
|
||||
|
||||
SmallPtrSet<Module*, 16> Added;
|
||||
for (std::set<std::string>::iterator I=symbols.begin(),
|
||||
E=symbols.end(); I != E; ++I) {
|
||||
Next = I,
|
||||
E=symbols.end(); I != E; I = Next) {
|
||||
// Increment Next before we invalidate it.
|
||||
++Next;
|
||||
|
||||
// See if this symbol exists
|
||||
Module* m = findModuleDefiningSymbol(*I,error);
|
||||
if (!m)
|
||||
|
Loading…
Reference in New Issue
Block a user