diff options
Diffstat (limited to 'lld/ELF/Writer.cpp')
-rw-r--r-- | lld/ELF/Writer.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 4b980b37dcd..b58e1bf1ab7 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -1348,9 +1348,7 @@ template <class ELFT> void Writer<ELFT>::resolveShfLinkOrder() { // Remove the Sections we marked as duplicate earlier. for (BaseCommand *Base : Sec->SectionCommands) if (auto *ISD = dyn_cast<InputSectionDescription>(Base)) - ISD->Sections.erase( - std::remove(ISD->Sections.begin(), ISD->Sections.end(), nullptr), - ISD->Sections.end()); + llvm::erase_if(ISD->Sections, [](InputSection *IS) { return !IS; }); } } |