diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-26 12:28:59 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2016-06-26 12:28:59 +0000 |
commit | 135f735af149e305635ba3886065b493d5c2bf8c (patch) | |
tree | efc8ab49d69279615e3d0a3563a7d05354270bf5 /llvm/lib/Transforms/IPO/MergeFunctions.cpp | |
parent | ff976c99c79d7a00f1c836a57c3e7499316553c4 (diff) | |
download | llvm-135f735af149e305635ba3886065b493d5c2bf8c.zip llvm-135f735af149e305635ba3886065b493d5c2bf8c.tar.gz llvm-135f735af149e305635ba3886065b493d5c2bf8c.tar.bz2 |
Apply clang-tidy's modernize-loop-convert to most of lib/Transforms.
Only minor manual fixes. No functionality change intended.
llvm-svn: 273808
Diffstat (limited to 'llvm/lib/Transforms/IPO/MergeFunctions.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/MergeFunctions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/MergeFunctions.cpp b/llvm/lib/Transforms/IPO/MergeFunctions.cpp index adf0d3f..fe653a7 100644 --- a/llvm/lib/Transforms/IPO/MergeFunctions.cpp +++ b/llvm/lib/Transforms/IPO/MergeFunctions.cpp @@ -1578,10 +1578,10 @@ bool MergeFunctions::runOnModule(Module &M) { DEBUG(dbgs() << "size of worklist: " << Worklist.size() << '\n'); // Insert functions and merge them. - for (std::vector<WeakVH>::iterator I = Worklist.begin(), - E = Worklist.end(); I != E; ++I) { - if (!*I) continue; - Function *F = cast<Function>(*I); + for (WeakVH &I : Worklist) { + if (!I) + continue; + Function *F = cast<Function>(I); if (!F->isDeclaration() && !F->hasAvailableExternallyLinkage()) { Changed |= insert(F); } |