[lld] r275972 - Fix build with gcc 6.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 19 10:24:59 PDT 2016


Thanks. I like the new name PhdrEntry.

On Tue, Jul 19, 2016 at 7:33 AM, Rafael Espindola via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Author: rafael
> Date: Tue Jul 19 07:33:46 2016
> New Revision: 275972
>
> URL: http://llvm.org/viewvc/llvm-project?rev=275972&view=rev
> Log:
> Fix build with gcc 6.
>
> Modified:
>     lld/trunk/ELF/LinkerScript.cpp
>     lld/trunk/ELF/LinkerScript.h
>     lld/trunk/ELF/Writer.cpp
>     lld/trunk/ELF/Writer.h
>
> Modified: lld/trunk/ELF/LinkerScript.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=275972&r1=275971&r2=275972&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/LinkerScript.cpp (original)
> +++ lld/trunk/ELF/LinkerScript.cpp Tue Jul 19 07:33:46 2016
> @@ -275,7 +275,7 @@ void LinkerScript<ELFT>::assignAddresses
>  }
>
>  template <class ELFT>
> -std::vector<Phdr<ELFT>>
> +std::vector<PhdrEntry<ELFT>>
>  LinkerScript<ELFT>::createPhdrs(ArrayRef<OutputSectionBase<ELFT> *>
> Sections) {
>    int TlsNum = -1;
>    int NoteNum = -1;
>
> Modified: lld/trunk/ELF/LinkerScript.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=275972&r1=275971&r2=275972&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/LinkerScript.h (original)
> +++ lld/trunk/ELF/LinkerScript.h Tue Jul 19 07:33:46 2016
> @@ -87,7 +87,7 @@ template <class ELFT> class LinkerScript
>    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);
>
> Modified: lld/trunk/ELF/Writer.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=275972&r1=275971&r2=275972&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Writer.cpp (original)
> +++ lld/trunk/ELF/Writer.cpp Tue Jul 19 07:33:46 2016
> @@ -44,7 +44,7 @@ public:
>    void run();
>
>  private:
> -  typedef Phdr<ELFT> Phdr;
> +  typedef PhdrEntry<ELFT> Phdr;
>
>    void copyLocalSymbols();
>    void addReservedSymbols();
> @@ -479,13 +479,13 @@ template <class ELFT> bool elf::isOutput
>
>  // 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<ELF32BE>(
>  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>();
>
> Modified: lld/trunk/ELF/Writer.h
> URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.h?rev=275972&r1=275971&r2=275972&view=diff
>
> ==============================================================================
> --- lld/trunk/ELF/Writer.h (original)
> +++ lld/trunk/ELF/Writer.h Tue Jul 19 07:33:46 2016
> @@ -35,8 +35,8 @@ uint32_t toPhdrFlags(uint64_t Flags);
>  // 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 = {};
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160719/1499dde9/attachment.html>


More information about the llvm-commits mailing list