forked from OSchip/llvm-project
[ELF] - Use llvm::find_if instead std::find_if where possible. NFC.
Two more places. llvm-svn: 307076
This commit is contained in:
parent
2344b7611a
commit
a951d5c40b
|
|
@ -485,12 +485,11 @@ void LinkerScript::addOrphanSections(OutputSectionFactory &Factory) {
|
||||||
if (!S->Live || S->Parent)
|
if (!S->Live || S->Parent)
|
||||||
continue;
|
continue;
|
||||||
StringRef Name = getOutputSectionName(S->Name);
|
StringRef Name = getOutputSectionName(S->Name);
|
||||||
auto I = std::find_if(
|
auto I = llvm::find_if(Opt.Commands, [&](BaseCommand *Base) {
|
||||||
Opt.Commands.begin(), Opt.Commands.end(), [&](BaseCommand *Base) {
|
if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base))
|
||||||
if (auto *Cmd = dyn_cast<OutputSectionCommand>(Base))
|
return Cmd->Name == Name;
|
||||||
return Cmd->Name == Name;
|
return false;
|
||||||
return false;
|
});
|
||||||
});
|
|
||||||
if (I == Opt.Commands.end()) {
|
if (I == Opt.Commands.end()) {
|
||||||
Factory.addInputSec(S, Name);
|
Factory.addInputSec(S, Name);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -1550,11 +1550,9 @@ template <class ELFT>
|
||||||
void Writer<ELFT>::addPtArmExid(std::vector<PhdrEntry> &Phdrs) {
|
void Writer<ELFT>::addPtArmExid(std::vector<PhdrEntry> &Phdrs) {
|
||||||
if (Config->EMachine != EM_ARM)
|
if (Config->EMachine != EM_ARM)
|
||||||
return;
|
return;
|
||||||
auto I =
|
auto I = llvm::find_if(OutputSectionCommands, [](OutputSectionCommand *Cmd) {
|
||||||
std::find_if(OutputSectionCommands.begin(), OutputSectionCommands.end(),
|
return Cmd->Sec->Type == SHT_ARM_EXIDX;
|
||||||
[](OutputSectionCommand *Cmd) {
|
});
|
||||||
return Cmd->Sec->Type == SHT_ARM_EXIDX;
|
|
||||||
});
|
|
||||||
if (I == OutputSectionCommands.end())
|
if (I == OutputSectionCommands.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue