From: Dan Gohman Date: Thu, 6 Nov 2008 21:57:17 +0000 (+0000) Subject: Fix a use of an invalid iterator when -debug-pass=Details is used. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e187726208f839691afca88bce8b2d6fe4d5bcbb;p=oota-llvm.git Fix a use of an invalid iterator when -debug-pass=Details is used. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58816 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/PassManager.cpp b/lib/VMCore/PassManager.cpp index 6f559c47c3f..690c485fe20 100644 --- a/lib/VMCore/PassManager.cpp +++ b/lib/VMCore/PassManager.cpp @@ -727,12 +727,12 @@ void PMDataManager::removeNotPreservedAnalysis(Pass *P) { && std::find(PreservedSet.begin(), PreservedSet.end(), Info->first) == PreservedSet.end()) { // Remove this analysis - AvailableAnalysis.erase(Info); if (PassDebugging >= Details) { Pass *S = Info->second; cerr << " -- '" << P->getPassName() << "' is not preserving '"; cerr << S->getPassName() << "'\n"; } + AvailableAnalysis.erase(Info); } }