Redefine isGnuIfunc as a member function of SymbolBody.
llvm-svn: 263365
diff --git a/lld/ELF/Symbols.cpp b/lld/ELF/Symbols.cpp
index aea97c4..8a7a18c 100644
--- a/lld/ELF/Symbols.cpp
+++ b/lld/ELF/Symbols.cpp
@@ -81,6 +81,12 @@
llvm_unreachable("invalid symbol kind");
}
+template <class ELFT> bool SymbolBody::isGnuIfunc() const {
+ if (auto *D = dyn_cast<DefinedElf<ELFT>>(this))
+ return D->Sym.getType() == STT_GNU_IFUNC;
+ return false;
+}
+
template <class ELFT>
typename ELFFile<ELFT>::uintX_t
SymbolBody::getVA(typename ELFFile<ELFT>::uintX_t Addend) const {
@@ -245,6 +251,11 @@
#endif
}
+template bool SymbolBody::template isGnuIfunc<ELF32LE>() const;
+template bool SymbolBody::template isGnuIfunc<ELF32BE>() const;
+template bool SymbolBody::template isGnuIfunc<ELF64LE>() const;
+template bool SymbolBody::template isGnuIfunc<ELF64BE>() const;
+
template uint32_t SymbolBody::template getVA<ELF32LE>(uint32_t) const;
template uint32_t SymbolBody::template getVA<ELF32BE>(uint32_t) const;
template uint64_t SymbolBody::template getVA<ELF64LE>(uint64_t) const;