From 483727da487c1cb97c6b23ce6eea37886a0df0e1 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200789 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/opt/PrintSCC.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tools/opt/PrintSCC.cpp') diff --git a/tools/opt/PrintSCC.cpp b/tools/opt/PrintSCC.cpp index 9322cbceec..0028214073 100644 --- a/tools/opt/PrintSCC.cpp +++ b/tools/opt/PrintSCC.cpp @@ -74,8 +74,7 @@ Z("print-callgraph-sccs", "Print SCCs of the Call Graph"); bool CFGSCC::runOnFunction(Function &F) { unsigned sccNum = 0; errs() << "SCCs for Function " << F.getName() << " in PostOrder:"; - for (scc_iterator SCCI = scc_begin(&F), - E = scc_end(&F); SCCI != E; ++SCCI) { + for (scc_iterator SCCI = scc_begin(&F); !SCCI.isAtEnd(); ++SCCI) { std::vector &nextSCC = *SCCI; errs() << "\nSCC #" << ++sccNum << " : "; for (std::vector::const_iterator I = nextSCC.begin(), @@ -95,8 +94,8 @@ bool CallGraphSCC::runOnModule(Module &M) { CallGraph &CG = getAnalysis().getCallGraph(); unsigned sccNum = 0; errs() << "SCCs for the program in PostOrder:"; - for (scc_iterator SCCI = scc_begin(&CG), - E = scc_end(&CG); SCCI != E; ++SCCI) { + for (scc_iterator SCCI = scc_begin(&CG); !SCCI.isAtEnd(); + ++SCCI) { const std::vector &nextSCC = *SCCI; errs() << "\nSCC #" << ++sccNum << " : "; for (std::vector::const_iterator I = nextSCC.begin(), -- cgit v1.2.3