mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-12 07:40:58 +00:00
Fix a problem that was caused by stale analyses being in CurrentAnalyses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b461373fbc
commit
3f00ef9660
@ -292,6 +292,19 @@ public:
|
||||
(Annotable*)M);
|
||||
(*I)->releaseMemory();
|
||||
}
|
||||
|
||||
// Make sure to remove dead passes from the CurrentAnalyses list...
|
||||
for (std::map<AnalysisID, Pass*>::iterator I = CurrentAnalyses.begin();
|
||||
I != CurrentAnalyses.end(); ) {
|
||||
std::vector<Pass*>::iterator DPI = std::find(DeadPass.begin(),
|
||||
DeadPass.end(), I->second);
|
||||
if (DPI != DeadPass.end()) { // This pass is dead now... remove it
|
||||
std::map<AnalysisID, Pass*>::iterator IDead = I++;
|
||||
CurrentAnalyses.erase(IDead);
|
||||
} else {
|
||||
++I; // Move on to the next element...
|
||||
}
|
||||
}
|
||||
}
|
||||
return MadeChanges;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user