forked from OSchip/llvm-project
[ELF] Make InputSection::classof inline. NFC
This commit is contained in:
parent
1a829d2d06
commit
bb3eeac773
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue