mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Avoid using an invalidated iterator.
llvm-svn: 148681
This commit is contained in:
parent
c53beeb5f6
commit
02f4d661a1
@ -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