summaryrefslogtreecommitdiff
path: root/lib/Analysis/IPA
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-02-04 19:19:07 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-02-04 19:19:07 +0000
commit483727da487c1cb97c6b23ce6eea37886a0df0e1 (patch)
treec844a9308d8c1316cd5cce9c2253a48ab5a7dd60 /lib/Analysis/IPA
parent7f15e90281c9862e9084ff2197f8fe8f06823fb2 (diff)
downloadllvm-483727da487c1cb97c6b23ce6eea37886a0df0e1.tar.gz
llvm-483727da487c1cb97c6b23ce6eea37886a0df0e1.tar.bz2
llvm-483727da487c1cb97c6b23ce6eea37886a0df0e1.tar.xz
cleanup: scc_iterator consumers should use isAtEnd
No functional change. Updated loops from: for (I = scc_begin(), E = scc_end(); I != E; ++I) to: for (I = scc_begin(); !I.isAtEnd(); ++I) for teh win. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200789 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/IPA')
-rw-r--r--lib/Analysis/IPA/GlobalsModRef.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/IPA/GlobalsModRef.cpp b/lib/Analysis/IPA/GlobalsModRef.cpp
index e0723026de..2a8b96da06 100644
--- a/lib/Analysis/IPA/GlobalsModRef.cpp
+++ b/lib/Analysis/IPA/GlobalsModRef.cpp
@@ -367,8 +367,7 @@ bool GlobalsModRef::AnalyzeIndirectGlobalMemory(GlobalValue *GV) {
void GlobalsModRef::AnalyzeCallGraph(CallGraph &CG, Module &M) {
// We do a bottom-up SCC traversal of the call graph. In other words, we
// visit all callees before callers (leaf-first).
- for (scc_iterator<CallGraph*> I = scc_begin(&CG), E = scc_end(&CG); I != E;
- ++I) {
+ for (scc_iterator<CallGraph*> I = scc_begin(&CG); !I.isAtEnd(); ++I) {
std::vector<CallGraphNode *> &SCC = *I;
assert(!SCC.empty() && "SCC with no functions?");