Skip to content

Commit f8f2e65

Browse files
[llvm] Use llvm::any_of (NFC) (#141444)
1 parent 85cbf74 commit f8f2e65

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

llvm/lib/Target/AMDGPU/AMDGPUWaitSGPRHazards.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,8 @@ class AMDGPUWaitSGPRHazards {
357357

358358
// Only consider implicit VCC specified by instruction descriptor.
359359
const bool HasImplicitVCC =
360-
llvm::any_of(MI->getDesc().implicit_uses(),
361-
[](MCPhysReg Reg) { return isVCC(Reg); }) ||
362-
llvm::any_of(MI->getDesc().implicit_defs(),
363-
[](MCPhysReg Reg) { return isVCC(Reg); });
360+
llvm::any_of(MI->getDesc().implicit_uses(), isVCC) ||
361+
llvm::any_of(MI->getDesc().implicit_defs(), isVCC);
364362

365363
if (IsSetPC) {
366364
// All SGPR writes before a call/return must be flushed as the

llvm/unittests/DebugInfo/LogicalView/DWARFReaderTest.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,10 @@ void checkUnspecifiedParameters(LVReader *Reader) {
169169
// `int foo_printf(const char *, ...)`, where the '...' is represented by a
170170
// DW_TAG_unspecified_parameters, i.e. we expect to find at least one child
171171
// for which getIsUnspecified() returns true.
172-
EXPECT_EQ(std::any_of(
173-
Elements->begin(), Elements->end(),
174-
[](const LVElement *elt) {
175-
return elt->getIsSymbol() &&
176-
static_cast<const LVSymbol *>(elt)->getIsUnspecified();
177-
}),
178-
true);
172+
EXPECT_TRUE(llvm::any_of(*Elements, [](const LVElement *elt) {
173+
return elt->getIsSymbol() &&
174+
static_cast<const LVSymbol *>(elt)->getIsUnspecified();
175+
}));
179176
}
180177

181178
// Check the basic properties on parsed DW_TAG_module.

0 commit comments

Comments
 (0)