aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/IPO/ExtractGV.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2016-06-26 12:28:59 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2016-06-26 12:28:59 +0000
commit135f735af149e305635ba3886065b493d5c2bf8c (patch)
treeefc8ab49d69279615e3d0a3563a7d05354270bf5 /llvm/lib/Transforms/IPO/ExtractGV.cpp
parentff976c99c79d7a00f1c836a57c3e7499316553c4 (diff)
downloadllvm-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/ExtractGV.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/ExtractGV.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/IPO/ExtractGV.cpp b/llvm/lib/Transforms/IPO/ExtractGV.cpp
index e1bd676..479fd18 100644
--- a/llvm/lib/Transforms/IPO/ExtractGV.cpp
+++ b/llvm/lib/Transforms/IPO/ExtractGV.cpp
@@ -104,20 +104,20 @@ namespace {
}
// Visit the Functions.
- for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
+ for (Function &F : M) {
bool Delete =
- deleteStuff == (bool)Named.count(&*I) && !I->isDeclaration();
+ deleteStuff == (bool)Named.count(&F) && !F.isDeclaration();
if (!Delete) {
- if (I->hasAvailableExternallyLinkage())
+ if (F.hasAvailableExternallyLinkage())
continue;
}
- makeVisible(*I, Delete);
+ makeVisible(F, Delete);
if (Delete) {
// Make this a declaration and drop it's comdat.
- I->deleteBody();
- I->setComdat(nullptr);
+ F.deleteBody();
+ F.setComdat(nullptr);
}
}