one more try at making this simpler, hopefully it won't break everything :)

llvm-svn: 80759
This commit is contained in:
Chris Lattner 2009-09-02 04:34:06 +00:00
parent 5632d96176
commit 8f23276431
1 changed files with 4 additions and 4 deletions

View File

@ -178,11 +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;
// If we removed the last edge, get out of the loop.
if (CGN->empty()) break;
E = CGN->end();
continue;
}