[lld] r316716 - Remove an unnecessary inheritance.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 26 16:54:00 PDT 2017
Author: ruiu
Date: Thu Oct 26 16:54:00 2017
New Revision: 316716
URL: http://llvm.org/viewvc/llvm-project?rev=316716&view=rev
Log:
Remove an unnecessary inheritance.
Modified:
lld/trunk/ELF/Arch/Mips.cpp
lld/trunk/ELF/SyntheticSections.cpp
lld/trunk/ELF/SyntheticSections.h
Modified: lld/trunk/ELF/Arch/Mips.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Arch/Mips.cpp?rev=316716&r1=316715&r2=316716&view=diff
==============================================================================
--- lld/trunk/ELF/Arch/Mips.cpp (original)
+++ lld/trunk/ELF/Arch/Mips.cpp Thu Oct 26 16:54:00 2017
@@ -246,8 +246,8 @@ static bool isMicroMips() { return Confi
template <class ELFT> void MIPS<ELFT>::writePltHeader(uint8_t *Buf) const {
const endianness E = ELFT::TargetEndianness;
if (isMicroMips()) {
- uint64_t GotPlt = In<ELFT>::GotPlt->getVA();
- uint64_t Plt = In<ELFT>::Plt->getVA();
+ uint64_t GotPlt = InX::GotPlt->getVA();
+ uint64_t Plt = InX::Plt->getVA();
// Overwrite trap instructions written by Writer::writeTrapInstr.
memset(Buf, 0, PltHeaderSize);
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=316716&r1=316715&r2=316716&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Thu Oct 26 16:54:00 2017
@@ -1096,13 +1096,13 @@ template <class ELFT> void DynamicSectio
add({DT_PLTRELSZ, In<ELFT>::RelaPlt->getParent(), Entry::SecSize});
switch (Config->EMachine) {
case EM_MIPS:
- add({DT_MIPS_PLTGOT, In<ELFT>::GotPlt});
+ add({DT_MIPS_PLTGOT, InX::GotPlt});
break;
case EM_SPARCV9:
- add({DT_PLTGOT, In<ELFT>::Plt});
+ add({DT_PLTGOT, InX::Plt});
break;
default:
- add({DT_PLTGOT, In<ELFT>::GotPlt});
+ add({DT_PLTGOT, InX::GotPlt});
break;
}
add({DT_PLTREL, uint64_t(Config->IsRela ? DT_RELA : DT_REL)});
Modified: lld/trunk/ELF/SyntheticSections.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.h?rev=316716&r1=316715&r2=316716&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.h (original)
+++ lld/trunk/ELF/SyntheticSections.h Thu Oct 26 16:54:00 2017
@@ -836,7 +836,7 @@ struct InX {
static SymbolTableBaseSection *SymTab;
};
-template <class ELFT> struct In : public InX {
+template <class ELFT> struct In {
static EhFrameHeader<ELFT> *EhFrameHdr;
static EhFrameSection<ELFT> *EhFrame;
static RelocationSection<ELFT> *RelaDyn;
More information about the llvm-commits
mailing list