aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-07-04 07:56:42 -0700
committerGitHub <noreply@github.com>2025-07-04 07:56:42 -0700
commite8543213e5fc41f521ae902433d49006aefb1bb7 (patch)
tree2afdb144ed3da912db451e57d1d313536d5165d7
parent60fca53ad64c18a6ec22ae35b0e4ea686e340e2d (diff)
downloadllvm-e8543213e5fc41f521ae902433d49006aefb1bb7.zip
llvm-e8543213e5fc41f521ae902433d49006aefb1bb7.tar.gz
llvm-e8543213e5fc41f521ae902433d49006aefb1bb7.tar.bz2
[IR] Use llvm::for_each (NFC) (#146989)
We can pass a range to llvm::for_each.
-rw-r--r--llvm/lib/IR/LegacyPassManager.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp
index c8f1606..1d9a61c 100644
--- a/llvm/lib/IR/LegacyPassManager.cpp
+++ b/llvm/lib/IR/LegacyPassManager.cpp
@@ -120,7 +120,7 @@ void PMDataManager::emitInstrCountChangedRemark(
// If no function was passed in, then we're either a module pass or an
// CGSCC pass.
if (!CouldOnlyImpactOneFunction)
- std::for_each(M.begin(), M.end(), UpdateFunctionChanges);
+ llvm::for_each(M, UpdateFunctionChanges);
else
UpdateFunctionChanges(*F);
@@ -197,9 +197,7 @@ void PMDataManager::emitInstrCountChangedRemark(
// Are we looking at more than one function? If so, emit remarks for all of
// the functions in the module. Otherwise, only emit one remark.
if (!CouldOnlyImpactOneFunction)
- std::for_each(FunctionToInstrCount.keys().begin(),
- FunctionToInstrCount.keys().end(),
- EmitFunctionSizeChangedRemark);
+ llvm::for_each(FunctionToInstrCount.keys(), EmitFunctionSizeChangedRemark);
else
EmitFunctionSizeChangedRemark(F->getName().str());
}