mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 10:42:39 +01:00
[llvm] Use llvm::any_of (NFC)
This commit is contained in:
parent
f118370581
commit
60a3732b33
@ -1204,7 +1204,7 @@ bool cl::ExpandResponseFiles(StringSaver &Saver, TokenizerCallback Tokenizer,
|
||||
};
|
||||
|
||||
// Check for recursive response files.
|
||||
if (std::any_of(FileStack.begin() + 1, FileStack.end(), IsEquivalent)) {
|
||||
if (any_of(drop_begin(FileStack), IsEquivalent)) {
|
||||
// This file is recursive, so we leave it in the argument stream and
|
||||
// move on.
|
||||
AllExpanded = false;
|
||||
|
@ -2451,8 +2451,8 @@ template <class ELFT> Error ELFWriter<ELFT>::finalize() {
|
||||
if (Obj.sections().size() >= SHN_LORESERVE) {
|
||||
SectionTableRef Sections = Obj.sections();
|
||||
NeedsLargeIndexes =
|
||||
std::any_of(Sections.begin() + SHN_LORESERVE, Sections.end(),
|
||||
[](const SectionBase &Sec) { return Sec.HasSymbol; });
|
||||
any_of(drop_begin(Sections, SHN_LORESERVE),
|
||||
[](const SectionBase &Sec) { return Sec.HasSymbol; });
|
||||
// TODO: handle case where only one section needs the large index table but
|
||||
// only needs it because the large index table hasn't been removed yet.
|
||||
}
|
||||
|
@ -218,12 +218,11 @@ FindUniqueOperandCommands(std::vector<std::string> &UniqueOperandCommands,
|
||||
|
||||
// Otherwise, scan to see if all of the other instructions in this command
|
||||
// set share the operand.
|
||||
if (std::any_of(Idxs.begin()+1, Idxs.end(),
|
||||
[&](unsigned Idx) {
|
||||
const AsmWriterInst &OtherInst = Instructions[Idx];
|
||||
return OtherInst.Operands.size() == Op ||
|
||||
OtherInst.Operands[Op] != FirstInst.Operands[Op];
|
||||
}))
|
||||
if (any_of(drop_begin(Idxs), [&](unsigned Idx) {
|
||||
const AsmWriterInst &OtherInst = Instructions[Idx];
|
||||
return OtherInst.Operands.size() == Op ||
|
||||
OtherInst.Operands[Op] != FirstInst.Operands[Op];
|
||||
}))
|
||||
break;
|
||||
|
||||
// Okay, everything in this command set has the same next operand. Add it
|
||||
|
Loading…
Reference in New Issue
Block a user