summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-02 04:34:06 +0000
committerChris Lattner <sabre@nondot.org>2009-09-02 04:34:06 +0000
commit8f232764316cefbe30e45d3e19c387e20312292b (patch)
tree3ee37b476ab9fc49e6cfa3110c93e4f7824dd9dc /llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
parent5632d96176ac0d60b2d80d909b9b639554bb0d61 (diff)
downloadbcm5719-llvm-8f232764316cefbe30e45d3e19c387e20312292b.tar.gz
bcm5719-llvm-8f232764316cefbe30e45d3e19c387e20312292b.zip
one more try at making this simpler, hopefully it won't break everything :)
llvm-svn: 80759
Diffstat (limited to 'llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp')
-rw-r--r--llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
index d21e0316828..25964b2cd8c 100644
--- a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -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;
}
OpenPOWER on IntegriCloud