cleanup: scc_iterator consumers should use isAtEnd
[oota-llvm.git] / lib / Transforms / IPO / FunctionAttrs.cpp
index 92d2f79fa7344fc2b30f4e57c42388c3bd402f7c..5ff55b0169e6169785634aa51073b7dbb383efef 100644 (file)
@@ -604,8 +604,7 @@ bool FunctionAttrs::AddArgumentAttrs(const CallGraphSCC &SCC) {
   // made.  If the definition doesn't have a 'nocapture' attribute by now, it
   // captures.
 
-  for (scc_iterator<ArgumentGraph*> I = scc_begin(&AG), E = scc_end(&AG);
-       I != E; ++I) {
+  for (scc_iterator<ArgumentGraph*> I = scc_begin(&AG); !I.isAtEnd(); ++I) {
     std::vector<ArgumentGraphNode*> &ArgumentSCC = *I;
     if (ArgumentSCC.size() == 1) {
       if (!ArgumentSCC[0]->Definition) continue;  // synthetic root node