[llvm] 378778a - [IR] Use llvm::any_of (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 13 14:54:35 PST 2022
Author: Kazu Hirata
Date: 2022-11-13T14:54:29-08:00
New Revision: 378778a0d10c2f8d5df8ceff81f95b6002984a4b
URL: https://github.com/llvm/llvm-project/commit/378778a0d10c2f8d5df8ceff81f95b6002984a4b
DIFF: https://github.com/llvm/llvm-project/commit/378778a0d10c2f8d5df8ceff81f95b6002984a4b.diff
LOG: [IR] Use llvm::any_of (NFC)
Added:
Modified:
llvm/lib/IR/DebugInfo.cpp
Removed:
################################################################################
diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index e2f369b2117fd..d02154f367ba3 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -1946,10 +1946,9 @@ void AssignmentTrackingPass::runOnFunction(Function &F) {
// Assert that the alloca that DDI uses is now linked to a dbg.assign
// describing the same variable (i.e. check that this dbg.declare
// has been replaced by a dbg.assign).
- assert(std::find_if(Markers.begin(), Markers.end(),
- [DDI](DbgAssignIntrinsic *DAI) {
- return DebugVariable(DAI) == DebugVariable(DDI);
- }) != Markers.end());
+ assert(llvm::any_of(Markers, [DDI](DbgAssignIntrinsic *DAI) {
+ return DebugVariable(DAI) == DebugVariable(DDI);
+ }));
// Delete DDI because the variable location is now tracked using
// assignment tracking.
DDI->eraseFromParent();
More information about the llvm-commits
mailing list