diff --git a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp --- a/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp +++ b/llvm/tools/llvm-reduce/deltas/ReduceOperandBundles.cpp @@ -56,10 +56,9 @@ OperandBundlesToKeepIndexes.reserve(Call.getNumOperandBundles()); // Enumerate every operand bundle on this call. - for_each(seq(0U, Call.getNumOperandBundles()), [&](unsigned BundleIndex) { + for (unsigned BundleIndex : seq(0U, Call.getNumOperandBundles())) if (O.shouldKeep()) // Should we keep this one? OperandBundlesToKeepIndexes.emplace_back(BundleIndex); - }); } }; @@ -102,9 +101,8 @@ OperandBundleRemapper R(ChunksToKeep); R.visit(Program); - for_each(R.CallsToRefine, [](const auto &P) { - return maybeRewriteCallWithDifferentBundles(P.first, P.second); - }); + for (const auto &I : R.CallsToRefine) + maybeRewriteCallWithDifferentBundles(I.first, I.second); } /// Counts the amount of operand bundles.