From 8e661efc00f2138412286bdb4662e9e7995ee23f Mon Sep 17 00:00:00 2001 From: "Duncan P. N. Exon Smith" Date: Tue, 4 Feb 2014 19:19:07 +0000 Subject: 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. llvm-svn: 200789 --- llvm/lib/Transforms/IPO/FunctionAttrs.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/IPO/FunctionAttrs.cpp') diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp index 92d2f79fa73..5ff55b0169e 100644 --- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp @@ -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 I = scc_begin(&AG), E = scc_end(&AG); - I != E; ++I) { + for (scc_iterator I = scc_begin(&AG); !I.isAtEnd(); ++I) { std::vector &ArgumentSCC = *I; if (ArgumentSCC.size() == 1) { if (!ArgumentSCC[0]->Definition) continue; // synthetic root node -- cgit v1.2.3