[lld] r302846 - Detemplate SymbolBody::getGotVA. NFC.
Rafael Espindola via llvm-commits
llvm-commits at lists.llvm.org
Thu May 11 16:28:50 PDT 2017
Author: rafael
Date: Thu May 11 18:28:49 2017
New Revision: 302846
URL: http://llvm.org/viewvc/llvm-project?rev=302846&view=rev
Log:
Detemplate SymbolBody::getGotVA. NFC.
Modified:
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/Symbols.cpp
lld/trunk/ELF/Symbols.h
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=302846&r1=302845&r2=302846&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Thu May 11 18:28:49 2017
@@ -400,7 +400,7 @@ getRelocTargetVA(uint32_t Type, int64_t
return Body.getVA(A);
case R_GOT:
case R_RELAX_TLS_GD_TO_IE_ABS:
- return Body.getGotVA<ELFT>() + A;
+ return Body.getGotVA() + A;
case R_GOTONLY_PC:
return InX::Got->getVA() + A - P;
case R_GOTONLY_PC_FROM_END:
@@ -416,10 +416,10 @@ getRelocTargetVA(uint32_t Type, int64_t
return Body.getGotOffset() + A;
case R_GOT_PAGE_PC:
case R_RELAX_TLS_GD_TO_IE_PAGE_PC:
- return getAArch64Page(Body.getGotVA<ELFT>() + A) - getAArch64Page(P);
+ return getAArch64Page(Body.getGotVA() + A) - getAArch64Page(P);
case R_GOT_PC:
case R_RELAX_TLS_GD_TO_IE:
- return Body.getGotVA<ELFT>() + A - P;
+ return Body.getGotVA() + A - P;
case R_HINT:
case R_NONE:
case R_TLSDESC_CALL:
Modified: lld/trunk/ELF/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.cpp?rev=302846&r1=302845&r2=302846&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.cpp (original)
+++ lld/trunk/ELF/Symbols.cpp Thu May 11 18:28:49 2017
@@ -163,7 +163,7 @@ uint64_t SymbolBody::getVA(int64_t Adden
return OutVA + Addend;
}
-template <class ELFT> typename ELFT::uint SymbolBody::getGotVA() const {
+uint64_t SymbolBody::getGotVA() const {
return InX::Got->getVA() + getGotOffset();
}
@@ -370,11 +370,6 @@ std::string lld::toString(const SymbolBo
return B.getName();
}
-template uint32_t SymbolBody::template getGotVA<ELF32LE>() const;
-template uint32_t SymbolBody::template getGotVA<ELF32BE>() const;
-template uint64_t SymbolBody::template getGotVA<ELF64LE>() const;
-template uint64_t SymbolBody::template getGotVA<ELF64BE>() const;
-
template uint32_t SymbolBody::template getSize<ELF32LE>() const;
template uint32_t SymbolBody::template getSize<ELF32BE>() const;
template uint64_t SymbolBody::template getSize<ELF64LE>() const;
Modified: lld/trunk/ELF/Symbols.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Symbols.h?rev=302846&r1=302845&r2=302846&view=diff
==============================================================================
--- lld/trunk/ELF/Symbols.h (original)
+++ lld/trunk/ELF/Symbols.h Thu May 11 18:28:49 2017
@@ -78,7 +78,7 @@ public:
uint64_t getVA(int64_t Addend = 0) const;
uint64_t getGotOffset() const;
- template <class ELFT> typename ELFT::uint getGotVA() const;
+ uint64_t getGotVA() const;
uint64_t getGotPltOffset() const;
uint64_t getGotPltVA() const;
uint64_t getPltVA() const;
More information about the llvm-commits
mailing list