[NFC] Converting to range-based for.
authorChris Bieneman <beanz@apple.com>
Wed, 29 Apr 2015 21:45:22 +0000 (21:45 +0000)
committerChris Bieneman <beanz@apple.com>
Wed, 29 Apr 2015 21:45:22 +0000 (21:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236163 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/LegacyPassManager.cpp

index 687003234b6c099587bcb26e857ad532d1361344..bbec6426c5d966a69e29e07c6d5c543f3e70342f 100644 (file)
@@ -88,8 +88,7 @@ PrintAfterAll("print-after-all",
 
 static bool ShouldPrintBeforeOrAfterPass(const PassInfo *PI,
                                          PassOptionList &PassesToPrint) {
 
 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;
     if (PassInf)
       if (PassInf->getPassArgument() == PI->getPassArgument()) {
         return true;