diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index 8110d9458567..6d237ea526ce 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -485,12 +485,11 @@ void LinkerScript::addOrphanSections(OutputSectionFactory &Factory) { if (!S->Live || S->Parent) continue; StringRef Name = getOutputSectionName(S->Name); - auto I = std::find_if( - Opt.Commands.begin(), Opt.Commands.end(), [&](BaseCommand *Base) { - if (auto *Cmd = dyn_cast(Base)) - return Cmd->Name == Name; - return false; - }); + auto I = llvm::find_if(Opt.Commands, [&](BaseCommand *Base) { + if (auto *Cmd = dyn_cast(Base)) + return Cmd->Name == Name; + return false; + }); if (I == Opt.Commands.end()) { Factory.addInputSec(S, Name); } else { diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 6df49269db85..463a25b2eedb 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1550,11 +1550,9 @@ template void Writer::addPtArmExid(std::vector &Phdrs) { if (Config->EMachine != EM_ARM) return; - auto I = - std::find_if(OutputSectionCommands.begin(), OutputSectionCommands.end(), - [](OutputSectionCommand *Cmd) { - return Cmd->Sec->Type == SHT_ARM_EXIDX; - }); + auto I = llvm::find_if(OutputSectionCommands, [](OutputSectionCommand *Cmd) { + return Cmd->Sec->Type == SHT_ARM_EXIDX; + }); if (I == OutputSectionCommands.end()) return;