aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Analysis
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
commit9d256f1e48cf074e739f478a48f9619797cbe4c1 (patch)
treef572127ff7cdb691ed9c373aeafde84c3a889e68 /lib/Analysis
parentd1585abba762e44ee70734e77dded04d3a6a77a7 (diff)
downloadexternal_llvm-9d256f1e48cf074e739f478a48f9619797cbe4c1.zip
external_llvm-9d256f1e48cf074e739f478a48f9619797cbe4c1.tar.gz
external_llvm-9d256f1e48cf074e739f478a48f9619797cbe4c1.tar.bz2
one more try at making this simpler, hopefully it won't break everything :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis')
-rw-r--r--lib/Analysis/IPA/CallGraphSCCPass.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Analysis/IPA/CallGraphSCCPass.cpp b/lib/Analysis/IPA/CallGraphSCCPass.cpp
index d21e031..25964b2 100644
--- a/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/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;
}