// take care of putting the two halves in the right place but we have to
// combine them.
SDValue &Bits =
- std::find_if(RegsToPass.begin(), RegsToPass.end(),
- [=](const std::pair<unsigned, SDValue> &Elt) {
- return Elt.first == VA.getLocReg();
- })
+ llvm::find_if(RegsToPass,
+ [=](const std::pair<unsigned, SDValue> &Elt) {
+ return Elt.first == VA.getLocReg();
+ })
->second;
Bits = DAG.getNode(ISD::OR, DL, Bits.getValueType(), Bits, Arg);
// Call site info is used for function's parameter entry value
if (RegsUsed.count(VA.getLocReg())) {
SDValue &Bits =
- std::find_if(RetVals.begin(), RetVals.end(),
- [=](const std::pair<unsigned, SDValue> &Elt) {
- return Elt.first == VA.getLocReg();
- })
- ->second;
+ llvm::find_if(RetVals, [=](const std::pair<unsigned, SDValue> &Elt) {
+ return Elt.first == VA.getLocReg();
+ })->second;
Bits = DAG.getNode(ISD::OR, DL, Bits.getValueType(), Bits, Arg);
} else {
RetVals.emplace_back(VA.getLocReg(), Arg);
if (!Symbols)
return false;
- auto Result = std::find_if(Symbols->begin(), Symbols->end(),
- [Value](const SymbolInfoTy& Val) {
- return Val.Addr == static_cast<uint64_t>(Value)
- && Val.Type == ELF::STT_NOTYPE;
- });
+ auto Result = llvm::find_if(*Symbols, [Value](const SymbolInfoTy &Val) {
+ return Val.Addr == static_cast<uint64_t>(Value) &&
+ Val.Type == ELF::STT_NOTYPE;
+ });
if (Result != Symbols->end()) {
auto *Sym = Ctx.getOrCreateSymbol(Result->Name);
const auto *Add = MCSymbolRefExpr::create(Sym, Ctx);
auto const UsedMask = getUsedRegMask(MO, MRI, LIS);
auto Reg = MO.getReg();
- auto I = std::find_if(Res.begin(), Res.end(), [Reg](const RegisterMaskPair &RM) {
- return RM.RegUnit == Reg;
- });
+ auto I = llvm::find_if(
+ Res, [Reg](const RegisterMaskPair &RM) { return RM.RegUnit == Reg; });
if (I != Res.end())
I->LaneMask |= UsedMask;
else
// Find saved info about the pre-reserved register.
const auto *ReservedVGPRInfoItr =
- std::find_if(FuncInfo->getSGPRSpillVGPRs().begin(),
- FuncInfo->getSGPRSpillVGPRs().end(),
- [PreReservedVGPR](const auto &SpillRegInfo) {
- return SpillRegInfo.VGPR == PreReservedVGPR;
- });
+ llvm::find_if(FuncInfo->getSGPRSpillVGPRs(),
+ [PreReservedVGPR](const auto &SpillRegInfo) {
+ return SpillRegInfo.VGPR == PreReservedVGPR;
+ });
assert(ReservedVGPRInfoItr != FuncInfo->getSGPRSpillVGPRs().end());
auto Index =
StringRef IDVal = Parser.getTok().getIdentifier();
const auto &Prefix =
- std::find_if(std::begin(PrefixEntries), std::end(PrefixEntries),
- [&IDVal](const PrefixEntry &PE) {
- return PE.Spelling == IDVal;
- });
+ llvm::find_if(PrefixEntries, [&IDVal](const PrefixEntry &PE) {
+ return PE.Spelling == IDVal;
+ });
if (Prefix == std::end(PrefixEntries)) {
Error(Parser.getTok().getLoc(), "unexpected prefix in operand");
return true;
}
const char *AVRMCExpr::getName() const {
- const auto &Modifier = std::find_if(
- std::begin(ModifierNames), std::end(ModifierNames),
- [this](ModifierEntry const &Mod) { return Mod.VariantKind == Kind; });
+ const auto &Modifier =
+ llvm::find_if(ModifierNames, [this](ModifierEntry const &Mod) {
+ return Mod.VariantKind == Kind;
+ });
if (Modifier != std::end(ModifierNames)) {
return Modifier->Spelling;
}
AVRMCExpr::VariantKind AVRMCExpr::getKindByName(StringRef Name) {
- const auto &Modifier = std::find_if(
- std::begin(ModifierNames), std::end(ModifierNames),
- [&Name](ModifierEntry const &Mod) { return Mod.Spelling == Name; });
+ const auto &Modifier =
+ llvm::find_if(ModifierNames, [&Name](ModifierEntry const &Mod) {
+ return Mod.Spelling == Name;
+ });
if (Modifier != std::end(ModifierNames)) {
return Modifier->VariantKind;
SmallVector<SwizzleEntry, 16> SwizzleCounts;
auto AddCount = [](auto &Counts, const auto &Val) {
- auto CountIt = std::find_if(Counts.begin(), Counts.end(),
- [&Val](auto E) { return E.first == Val; });
+ auto CountIt =
+ llvm::find_if(Counts, [&Val](auto E) { return E.first == Val; });
if (CountIt == Counts.end()) {
Counts.emplace_back(Val, 1);
} else {
}}, // i64
};
- auto OpEntryIt = std::find_if(std::begin(OpTable), std::end(OpTable),
- [RegTy](const DivRemEntry &El) {
- return El.SizeInBits == RegTy.getSizeInBits();
- });
+ auto OpEntryIt = llvm::find_if(OpTable, [RegTy](const DivRemEntry &El) {
+ return El.SizeInBits == RegTy.getSizeInBits();
+ });
if (OpEntryIt == std::end(OpTable))
return false;