diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-26 17:27:42 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-26 17:27:42 +0000 |
commit | aa2091505f6de0ababf8a6ec54e8a26c8b0be2be (patch) | |
tree | 124f3edf32b0d056358b0d313f04fee8feb2d1cb /llvm/lib/Analysis/IVUsers.cpp | |
parent | d8db1e172cf320490c273380b847690007247b11 (diff) | |
download | bcm5719-llvm-aa2091505f6de0ababf8a6ec54e8a26c8b0be2be.tar.gz bcm5719-llvm-aa2091505f6de0ababf8a6ec54e8a26c8b0be2be.zip |
Apply clang-tidy's modernize-loop-convert to lib/Analysis.
Only minor manual fixes. No functionality change intended.
llvm-svn: 273816
Diffstat (limited to 'llvm/lib/Analysis/IVUsers.cpp')
-rw-r--r-- | llvm/lib/Analysis/IVUsers.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/llvm/lib/Analysis/IVUsers.cpp b/llvm/lib/Analysis/IVUsers.cpp index 2cd67f0a789..e974cb9e711 100644 --- a/llvm/lib/Analysis/IVUsers.cpp +++ b/llvm/lib/Analysis/IVUsers.cpp @@ -290,21 +290,18 @@ void IVUsers::print(raw_ostream &OS, const Module *M) const { } OS << ":\n"; - for (ilist<IVStrideUse>::const_iterator UI = IVUses.begin(), - E = IVUses.end(); UI != E; ++UI) { + for (const IVStrideUse &IVUse : IVUses) { OS << " "; - UI->getOperandValToReplace()->printAsOperand(OS, false); - OS << " = " << *getReplacementExpr(*UI); - for (PostIncLoopSet::const_iterator - I = UI->PostIncLoops.begin(), - E = UI->PostIncLoops.end(); I != E; ++I) { + IVUse.getOperandValToReplace()->printAsOperand(OS, false); + OS << " = " << *getReplacementExpr(IVUse); + for (auto PostIncLoop : IVUse.PostIncLoops) { OS << " (post-inc with loop "; - (*I)->getHeader()->printAsOperand(OS, false); + PostIncLoop->getHeader()->printAsOperand(OS, false); OS << ")"; } OS << " in "; - if (UI->getUser()) - UI->getUser()->print(OS); + if (IVUse.getUser()) + IVUse.getUser()->print(OS); else OS << "Printing <null> User"; OS << '\n'; |