Complicate Chris's simplification, avoiding complaints

about singular iterators when building with expensive
checks turned on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80757 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan Sands 2009-09-02 03:48:41 +00:00
parent 545898183e
commit b3020d7a08

View File

@ -178,7 +178,11 @@ void CGPassManager::RefreshCallGraph(std::vector<CallGraphNode*> &CurSCC,
"CallGraphSCCPass did not update the CallGraph correctly!");
// Just remove the edge from the set of callees.
bool wasLast = I + 1 == E;
CGN->removeCallEdge(I);
if (wasLast)
// I is now a singular iterator, do not compare with E.
break;
E = CGN->end();
continue;
}