[lld] r369838 - [ELF] Make member function Writer<ELFT>::removeEmptyPTLoad non-member. NFC
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 23:31:34 PDT 2019
Author: maskray
Date: Fri Aug 23 23:31:34 2019
New Revision: 369838
URL: http://llvm.org/viewvc/llvm-project?rev=369838&view=rev
Log:
[ELF] Make member function Writer<ELFT>::removeEmptyPTLoad non-member. NFC
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=369838&r1=369837&r2=369838&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Aug 23 23:31:34 2019
@@ -62,7 +62,6 @@ private:
void setReservedSymbolSections();
std::vector<PhdrEntry *> createPhdrs(Partition &part);
- void removeEmptyPTLoad(std::vector<PhdrEntry *> &phdrEntry);
void addPhdrForSection(Partition &part, unsigned shType, unsigned pType,
unsigned pFlags);
void assignFileOffsets();
@@ -142,8 +141,7 @@ static bool needsInterpSection() {
template <class ELFT> void elf::writeResult() { Writer<ELFT>().run(); }
-template <class ELFT>
-void Writer<ELFT>::removeEmptyPTLoad(std::vector<PhdrEntry *> &phdrs) {
+static void removeEmptyPTLoad(std::vector<PhdrEntry *> &phdrs) {
llvm::erase_if(phdrs, [&](const PhdrEntry *p) {
if (p->p_type != PT_LOAD)
return false;
More information about the llvm-commits
mailing list