diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-02-04 19:19:07 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-02-04 19:19:07 +0000 |
commit | 8e661efc00f2138412286bdb4662e9e7995ee23f (patch) | |
tree | bf2d93b5d60ae34ab44c1448af7021cc466a7dd2 /llvm/tools/opt | |
parent | d554a8eb91116cf055f36e3ffe34cb262a110fd5 (diff) | |
download | bcm5719-llvm-8e661efc00f2138412286bdb4662e9e7995ee23f.tar.gz bcm5719-llvm-8e661efc00f2138412286bdb4662e9e7995ee23f.zip |
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
Diffstat (limited to 'llvm/tools/opt')
-rw-r--r-- | llvm/tools/opt/PrintSCC.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/tools/opt/PrintSCC.cpp b/llvm/tools/opt/PrintSCC.cpp index 9322cbceec3..00282140730 100644 --- a/llvm/tools/opt/PrintSCC.cpp +++ b/llvm/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<Function*> SCCI = scc_begin(&F), - E = scc_end(&F); SCCI != E; ++SCCI) { + for (scc_iterator<Function*> SCCI = scc_begin(&F); !SCCI.isAtEnd(); ++SCCI) { std::vector<BasicBlock*> &nextSCC = *SCCI; errs() << "\nSCC #" << ++sccNum << " : "; for (std::vector<BasicBlock*>::const_iterator I = nextSCC.begin(), @@ -95,8 +94,8 @@ bool CallGraphSCC::runOnModule(Module &M) { CallGraph &CG = getAnalysis<CallGraphWrapperPass>().getCallGraph(); unsigned sccNum = 0; errs() << "SCCs for the program in PostOrder:"; - for (scc_iterator<CallGraph*> SCCI = scc_begin(&CG), - E = scc_end(&CG); SCCI != E; ++SCCI) { + for (scc_iterator<CallGraph*> SCCI = scc_begin(&CG); !SCCI.isAtEnd(); + ++SCCI) { const std::vector<CallGraphNode*> &nextSCC = *SCCI; errs() << "\nSCC #" << ++sccNum << " : "; for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(), |