llvm.org GIT mirror llvm / 4254df3
Avoid using an invalidated iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148681 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 8 years ago
1 changed file(s) with 5 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
571571
572572 SmallPtrSet Added;
573573 for (std::set::iterator I=symbols.begin(),
574 E=symbols.end(); I != E; ++I) {
574 Next = I,
575 E=symbols.end(); I != E; I = Next) {
576 // Increment Next before we invalidate it.
577 ++Next;
578
575579 // See if this symbol exists
576580 Module* m = findModuleDefiningSymbol(*I,error);
577581 if (!m)