Fix build with gcc 6.
llvm-svn: 275972
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 28f60ca1..e56e1a2 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -275,7 +275,7 @@
}
template <class ELFT>
-std::vector<Phdr<ELFT>>
+std::vector<PhdrEntry<ELFT>>
LinkerScript<ELFT>::createPhdrs(ArrayRef<OutputSectionBase<ELFT> *> Sections) {
int TlsNum = -1;
int NoteNum = -1;
diff --git a/lld/ELF/LinkerScript.h b/lld/ELF/LinkerScript.h
index 4ff7150..90bb811 100644
--- a/lld/ELF/LinkerScript.h
+++ b/lld/ELF/LinkerScript.h
@@ -87,7 +87,7 @@
typedef typename ELFT::uint uintX_t;
public:
- typedef Phdr<ELFT> Phdr;
+ typedef PhdrEntry<ELFT> Phdr;
StringRef getOutputSection(InputSectionBase<ELFT> *S);
ArrayRef<uint8_t> getFiller(StringRef Name);
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp
index 784e182..0c6bd0d 100644
--- a/lld/ELF/Writer.cpp
+++ b/lld/ELF/Writer.cpp
@@ -44,7 +44,7 @@
void run();
private:
- typedef Phdr<ELFT> Phdr;
+ typedef PhdrEntry<ELFT> Phdr;
void copyLocalSymbols();
void addReservedSymbols();
@@ -479,13 +479,13 @@
// Program header entry
template<class ELFT>
-Phdr<ELFT>::Phdr(unsigned Type, unsigned Flags) {
+PhdrEntry<ELFT>::PhdrEntry(unsigned Type, unsigned Flags) {
H.p_type = Type;
H.p_flags = Flags;
}
template<class ELFT>
-void Phdr<ELFT>::AddSec(OutputSectionBase<ELFT> *Sec) {
+void PhdrEntry<ELFT>::AddSec(OutputSectionBase<ELFT> *Sec) {
Last = Sec;
if (!First)
First = Sec;
@@ -1285,10 +1285,10 @@
template void elf::writeResult<ELF64LE>(SymbolTable<ELF64LE> *Symtab);
template void elf::writeResult<ELF64BE>(SymbolTable<ELF64BE> *Symtab);
-template struct elf::Phdr<ELF32LE>;
-template struct elf::Phdr<ELF32BE>;
-template struct elf::Phdr<ELF64LE>;
-template struct elf::Phdr<ELF64BE>;
+template struct elf::PhdrEntry<ELF32LE>;
+template struct elf::PhdrEntry<ELF32BE>;
+template struct elf::PhdrEntry<ELF64LE>;
+template struct elf::PhdrEntry<ELF64BE>;
template bool elf::needsInterpSection<ELF32LE>();
template bool elf::needsInterpSection<ELF32BE>();
diff --git a/lld/ELF/Writer.h b/lld/ELF/Writer.h
index ec7a2eb..256d74b 100644
--- a/lld/ELF/Writer.h
+++ b/lld/ELF/Writer.h
@@ -35,8 +35,8 @@
// Each contains type, access flags and range of output sections that will be
// placed in it.
template<class ELFT>
-struct Phdr {
- Phdr(unsigned Type, unsigned Flags);
+struct PhdrEntry {
+ PhdrEntry(unsigned Type, unsigned Flags);
void AddSec(OutputSectionBase<ELFT> *Sec);
typename ELFT::Phdr H = {};