};
// 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;
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.
}
// 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