forked from OSchip/llvm-project
Fix a use of an invalid iterator when -debug-pass=Details is used.
llvm-svn: 58816
This commit is contained in:
parent
8b47c1e0a2
commit
193e4c025e
llvm/lib/VMCore
|
@ -727,12 +727,12 @@ void PMDataManager::removeNotPreservedAnalysis(Pass *P) {
|
||||||
&& std::find(PreservedSet.begin(), PreservedSet.end(), Info->first) ==
|
&& std::find(PreservedSet.begin(), PreservedSet.end(), Info->first) ==
|
||||||
PreservedSet.end()) {
|
PreservedSet.end()) {
|
||||||
// Remove this analysis
|
// Remove this analysis
|
||||||
AvailableAnalysis.erase(Info);
|
|
||||||
if (PassDebugging >= Details) {
|
if (PassDebugging >= Details) {
|
||||||
Pass *S = Info->second;
|
Pass *S = Info->second;
|
||||||
cerr << " -- '" << P->getPassName() << "' is not preserving '";
|
cerr << " -- '" << P->getPassName() << "' is not preserving '";
|
||||||
cerr << S->getPassName() << "'\n";
|
cerr << S->getPassName() << "'\n";
|
||||||
}
|
}
|
||||||
|
AvailableAnalysis.erase(Info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue