diff options
Diffstat (limited to 'llvm/lib/Transforms/IPO/ExtractGV.cpp')
-rw-r--r-- | llvm/lib/Transforms/IPO/ExtractGV.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/IPO/ExtractGV.cpp b/llvm/lib/Transforms/IPO/ExtractGV.cpp index e1bd676373b..479fd182598 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); } } |