Skip to content

Commit dca8209

Browse files
[llvm] Use llvm::any_of (NFC) (#104443)
1 parent 3080c80 commit dca8209

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

llvm/lib/ProfileData/Coverage/CoverageMapping.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,9 +1533,9 @@ LineCoverageStats::LineCoverageStats(
15331533

15341534
// if there is any starting segment at this line with a counter, it must be
15351535
// mapped
1536-
Mapped |= std::any_of(
1537-
LineSegments.begin(), LineSegments.end(),
1538-
[](const auto *Seq) { return Seq->IsRegionEntry && Seq->HasCount; });
1536+
Mapped |= any_of(LineSegments, [](const auto *Seq) {
1537+
return Seq->IsRegionEntry && Seq->HasCount;
1538+
});
15391539

15401540
if (!Mapped) {
15411541
return;

llvm/lib/Target/AArch64/AArch64InstrInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9074,8 +9074,8 @@ AArch64InstrInfo::getOutliningCandidateInfo(
90749074
// link register.
90759075
outliner::Candidate &FirstCand = RepeatedSequenceLocs[0];
90769076
bool ModStackToSaveLR = false;
9077-
if (std::any_of(FirstCand.begin(), std::prev(FirstCand.end()),
9078-
[](const MachineInstr &MI) { return MI.isCall(); }))
9077+
if (any_of(drop_end(FirstCand),
9078+
[](const MachineInstr &MI) { return MI.isCall(); }))
90799079
ModStackToSaveLR = true;
90809080

90819081
// Handle the last instruction separately. If this is a tail call, then the

llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6074,8 +6074,8 @@ ARMBaseInstrInfo::getOutliningCandidateInfo(
60746074
// check if the range contains a call. These require a save + restore of
60756075
// the link register.
60766076
outliner::Candidate &FirstCand = RepeatedSequenceLocs[0];
6077-
if (std::any_of(FirstCand.begin(), std::prev(FirstCand.end()),
6078-
[](const MachineInstr &MI) { return MI.isCall(); }))
6077+
if (any_of(drop_end(FirstCand),
6078+
[](const MachineInstr &MI) { return MI.isCall(); }))
60796079
NumBytesToCreateFrame += Costs.SaveRestoreLROnStack;
60806080

60816081
// Handle the last instruction separately. If it is tail call, then the

llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13090,9 +13090,9 @@ bool ARMAsmParser::isMnemonicVPTPredicable(StringRef Mnemonic,
1309013090
"vshrn", "vsli", "vsri", "vstrb", "vstrd",
1309113091
"vstrw", "vsub"};
1309213092

13093-
return std::any_of(
13094-
std::begin(predicable_prefixes), std::end(predicable_prefixes),
13095-
[&Mnemonic](const char *prefix) { return Mnemonic.starts_with(prefix); });
13093+
return any_of(predicable_prefixes, [&Mnemonic](const char *prefix) {
13094+
return Mnemonic.starts_with(prefix);
13095+
});
1309613096
}
1309713097

1309813098
std::unique_ptr<ARMOperand> ARMAsmParser::defaultCondCodeOp() {

0 commit comments

Comments
 (0)