cleanup: scc_iterator consumers should use isAtEnd
[oota-llvm.git] / lib / Analysis / IPA / GlobalsModRef.cpp
index e0723026de72464197c5bc4e63c605f8efe94809..2a8b96da069e5837373d52b2c4e4954adc8abe3c 100644 (file)
@@ -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?");