diff options
Diffstat (limited to 'lld/ELF/Target.cpp')
| -rw-r--r-- | lld/ELF/Target.cpp | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/lld/ELF/Target.cpp b/lld/ELF/Target.cpp index ed89aade3ab..eee5f3b0301 100644 --- a/lld/ELF/Target.cpp +++ b/lld/ELF/Target.cpp @@ -70,12 +70,6 @@ template <unsigned N> static void checkAlignment(uint64_t V, uint32_t Type) { error("improper alignment for relocation " + S); } -template <class ELFT> bool isGnuIFunc(const SymbolBody &S) { - if (auto *SS = dyn_cast<DefinedElf<ELFT>>(&S)) - return SS->Sym.getType() == STT_GNU_IFUNC; - return false; -} - namespace { class X86TargetInfo final : public TargetInfo { public: @@ -315,7 +309,7 @@ bool TargetInfo::refersToGotEntry(uint32_t Type) const { return false; } template <class ELFT> TargetInfo::PltNeed TargetInfo::needsPlt(uint32_t Type, const SymbolBody &S) const { - if (isGnuIFunc<ELFT>(S)) + if (S.isGnuIfunc<ELFT>()) return Plt_Explicit; if (canBePreempted(S) && needsPltImpl(Type)) return Plt_Explicit; @@ -1806,11 +1800,6 @@ template <class ELFT> typename ELFFile<ELFT>::uintX_t getMipsGpAddr() { return 0; } -template bool isGnuIFunc<ELF32LE>(const SymbolBody &S); -template bool isGnuIFunc<ELF32BE>(const SymbolBody &S); -template bool isGnuIFunc<ELF64LE>(const SymbolBody &S); -template bool isGnuIFunc<ELF64BE>(const SymbolBody &S); - template uint32_t getMipsGpAddr<ELF32LE>(); template uint32_t getMipsGpAddr<ELF32BE>(); template uint64_t getMipsGpAddr<ELF64LE>(); |

