[lld] r272129 - [ELF] - Replaced hardcode with named constants. NFC.
Rafael EspĂndola via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 8 19:44:54 PDT 2016
Thanks!
On 8 June 2016 at 07:40, George Rimar via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
> Author: grimar
> Date: Wed Jun 8 06:40:24 2016
> New Revision: 272129
>
> URL: http://llvm.org/viewvc/llvm-project?rev=272129&view=rev
> Log:
> [ELF] - Replaced hardcode with named constants. NFC.
>
> Modified:
> lld/trunk/ELF/InputFiles.cpp
> lld/trunk/ELF/OutputSections.cpp
>
> Modified: lld/trunk/ELF/InputFiles.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputFiles.cpp?rev=272129&r1=272128&r2=272129&view=diff
> ==============================================================================
> --- lld/trunk/ELF/InputFiles.cpp (original)
> +++ lld/trunk/ELF/InputFiles.cpp Wed Jun 8 06:40:24 2016
> @@ -532,7 +532,8 @@ template <class ELFT> void SharedFile<EL
>
> if (Versym) {
> // Ignore local symbols and non-default versions.
> - if (VersymIndex == 0 || VersymIndex == 1 || (VersymIndex & VERSYM_HIDDEN))
> + if (VersymIndex == VER_NDX_LOCAL || VersymIndex == VER_NDX_GLOBAL ||
> + (VersymIndex & VERSYM_HIDDEN))
> continue;
> }
> elf::Symtab<ELFT>::X->addShared(this, Name, Sym, Verdefs[VersymIndex]);
>
> Modified: lld/trunk/ELF/OutputSections.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/OutputSections.cpp?rev=272129&r1=272128&r2=272129&view=diff
> ==============================================================================
> --- lld/trunk/ELF/OutputSections.cpp (original)
> +++ lld/trunk/ELF/OutputSections.cpp Wed Jun 8 06:40:24 2016
> @@ -1430,8 +1430,7 @@ template <class ELFT> void VersionTableS
> if (auto *SS = dyn_cast<SharedSymbol<ELFT>>(P.first))
> OutVersym->vs_index = SS->VersionId;
> else
> - // The reserved identifier for a non-versioned global symbol.
> - OutVersym->vs_index = 1;
> + OutVersym->vs_index = VER_NDX_GLOBAL;
> ++OutVersym;
> }
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list