Pass a InputSectionData to classoff.

This allows a non template class to hold input sections.

llvm-svn: 285221
This commit is contained in:
Rafael Espindola 2016-10-26 18:44:57 +00:00
parent 8fcc3afdd1
commit 99558efed6
2 changed files with 12 additions and 12 deletions

View File

@ -200,7 +200,7 @@ InputSection<ELFT>::InputSection(elf::ObjectFile<ELFT> *F,
: InputSectionBase<ELFT>(F, Header, Name, Base::Regular) {}
template <class ELFT>
bool InputSection<ELFT>::classof(const InputSectionBase<ELFT> *S) {
bool InputSection<ELFT>::classof(const InputSectionData *S) {
return S->kind() == Base::Regular;
}
@ -527,7 +527,7 @@ EhInputSection<ELFT>::EhInputSection(elf::ObjectFile<ELFT> *F,
}
template <class ELFT>
bool EhInputSection<ELFT>::classof(const InputSectionBase<ELFT> *S) {
bool EhInputSection<ELFT>::classof(const InputSectionData *S) {
return S->kind() == InputSectionBase<ELFT>::EHFrame;
}
@ -664,7 +664,7 @@ template <class ELFT> void MergeInputSection<ELFT>::splitIntoPieces() {
}
template <class ELFT>
bool MergeInputSection<ELFT>::classof(const InputSectionBase<ELFT> *S) {
bool MergeInputSection<ELFT>::classof(const InputSectionData *S) {
return S->kind() == InputSectionBase<ELFT>::Merge;
}
@ -766,7 +766,7 @@ MipsReginfoInputSection<ELFT>::MipsReginfoInputSection(elf::ObjectFile<ELFT> *F,
}
template <class ELFT>
bool MipsReginfoInputSection<ELFT>::classof(const InputSectionBase<ELFT> *S) {
bool MipsReginfoInputSection<ELFT>::classof(const InputSectionData *S) {
return S->kind() == InputSectionBase<ELFT>::MipsReginfo;
}
@ -797,7 +797,7 @@ MipsOptionsInputSection<ELFT>::MipsOptionsInputSection(elf::ObjectFile<ELFT> *F,
}
template <class ELFT>
bool MipsOptionsInputSection<ELFT>::classof(const InputSectionBase<ELFT> *S) {
bool MipsOptionsInputSection<ELFT>::classof(const InputSectionData *S) {
return S->kind() == InputSectionBase<ELFT>::MipsOptions;
}
@ -816,7 +816,7 @@ MipsAbiFlagsInputSection<ELFT>::MipsAbiFlagsInputSection(
}
template <class ELFT>
bool MipsAbiFlagsInputSection<ELFT>::classof(const InputSectionBase<ELFT> *S) {
bool MipsAbiFlagsInputSection<ELFT>::classof(const InputSectionData *S) {
return S->kind() == InputSectionBase<ELFT>::MipsAbiFlags;
}

View File

@ -162,7 +162,7 @@ template <class ELFT> class MergeInputSection : public InputSectionBase<ELFT> {
public:
MergeInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header,
StringRef Name);
static bool classof(const InputSectionBase<ELFT> *S);
static bool classof(const InputSectionData *S);
void splitIntoPieces();
// Mark the piece at a given offset live. Used by GC.
@ -213,7 +213,7 @@ public:
typedef typename ELFT::Shdr Elf_Shdr;
typedef typename ELFT::uint uintX_t;
EhInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Header, StringRef Name);
static bool classof(const InputSectionBase<ELFT> *S);
static bool classof(const InputSectionData *S);
void split();
template <class RelTy> void split(ArrayRef<RelTy> Rels);
@ -254,7 +254,7 @@ public:
// InputSection that is dependent on us (reverse dependency for GC)
InputSectionBase<ELFT> *DependentSection = nullptr;
static bool classof(const InputSectionBase<ELFT> *S);
static bool classof(const InputSectionData *S);
InputSectionBase<ELFT> *getRelocatedSection();
@ -309,7 +309,7 @@ class MipsReginfoInputSection : public InputSectionBase<ELFT> {
public:
MipsReginfoInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Hdr,
StringRef Name);
static bool classof(const InputSectionBase<ELFT> *S);
static bool classof(const InputSectionData *S);
const llvm::object::Elf_Mips_RegInfo<ELFT> *Reginfo = nullptr;
};
@ -321,7 +321,7 @@ class MipsOptionsInputSection : public InputSectionBase<ELFT> {
public:
MipsOptionsInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Hdr,
StringRef Name);
static bool classof(const InputSectionBase<ELFT> *S);
static bool classof(const InputSectionData *S);
const llvm::object::Elf_Mips_RegInfo<ELFT> *Reginfo = nullptr;
};
@ -333,7 +333,7 @@ class MipsAbiFlagsInputSection : public InputSectionBase<ELFT> {
public:
MipsAbiFlagsInputSection(ObjectFile<ELFT> *F, const Elf_Shdr *Hdr,
StringRef Name);
static bool classof(const InputSectionBase<ELFT> *S);
static bool classof(const InputSectionData *S);
const llvm::object::Elf_Mips_ABIFlags<ELFT> *Flags = nullptr;
};