diff --git a/llvm/tools/bugpoint/FindBugs.cpp b/llvm/tools/bugpoint/FindBugs.cpp index 31945fadd95d8..67084b850fdda 100644 --- a/llvm/tools/bugpoint/FindBugs.cpp +++ b/llvm/tools/bugpoint/FindBugs.cpp @@ -47,9 +47,8 @@ BugDriver::runManyPasses(const std::vector &AllPasses) { // Step 2: Run optimizer passes on the program and check for success. // outs() << "Running selected passes on program to test for crash: "; - for (int i = 0, e = PassesToRun.size(); i != e; i++) { - outs() << "-" << PassesToRun[i] << " "; - } + for (const std::string &Pass : PassesToRun) + outs() << "-" << Pass << " "; std::string Filename; if (runPasses(*Program, PassesToRun, Filename, false)) {