diff --git a/lib/IR/LegacyPassManager.cpp b/lib/IR/LegacyPassManager.cpp index 687003234b6..bbec6426c5d 100644 --- a/lib/IR/LegacyPassManager.cpp +++ b/lib/IR/LegacyPassManager.cpp @@ -88,8 +88,7 @@ PrintAfterAll("print-after-all", static bool ShouldPrintBeforeOrAfterPass(const PassInfo *PI, PassOptionList &PassesToPrint) { - for (unsigned i = 0, ie = PassesToPrint.size(); i < ie; ++i) { - const llvm::PassInfo *PassInf = PassesToPrint[i]; + for (auto *PassInf : PassesToPrint) { if (PassInf) if (PassInf->getPassArgument() == PI->getPassArgument()) { return true;