diff options
Diffstat (limited to 'lib/Archive')
-rw-r--r-- | lib/Archive/ArchiveReader.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Archive/ArchiveReader.cpp b/lib/Archive/ArchiveReader.cpp index 0c89baa..a78c0f5 100644 --- a/lib/Archive/ArchiveReader.cpp +++ b/lib/Archive/ArchiveReader.cpp @@ -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) |