[ELF] Make InputSection::classof inline. NFC

This commit is contained in:
Fangrui Song 2022-02-28 00:16:45 -08:00
parent 1a829d2d06
commit bb3eeac773
2 changed files with 5 additions and 7 deletions

View File

@ -323,11 +323,6 @@ InputSection::InputSection(ObjFile<ELFT> &f, const typename ELFT::Shdr &header,
StringRef name)
: InputSectionBase(f, header, name, InputSectionBase::Regular) {}
bool InputSection::classof(const SectionBase *s) {
return s->kind() == SectionBase::Regular ||
s->kind() == SectionBase::Synthetic;
}
OutputSection *InputSection::getParent() const {
return cast_or_null<OutputSection>(parent);
}

View File

@ -339,6 +339,11 @@ public:
InputSection(ObjFile<ELFT> &f, const typename ELFT::Shdr &header,
StringRef name);
static bool classof(const SectionBase *s) {
return s->kind() == SectionBase::Regular ||
s->kind() == SectionBase::Synthetic;
}
// Write this section to a mmap'ed file, assuming Buf is pointing to
// beginning of the output section.
template <class ELFT> void writeTo(uint8_t *buf);
@ -351,8 +356,6 @@ public:
// the beginning of the output section this section was assigned to.
uint64_t outSecOff = 0;
static bool classof(const SectionBase *s);
InputSectionBase *getRelocatedSection() const;
template <class ELFT, class RelTy>