Inline hot functions.

llvm-svn: 314637
This commit is contained in:
Rui Ueyama 2017-10-01 23:46:31 +00:00
parent c013399197
commit 43ca7167ad
2 changed files with 3 additions and 15 deletions

View File

@ -348,10 +348,6 @@ bool InputSection::classof(const SectionBase *S) {
S->kind() == SectionBase::Synthetic;
}
bool InputSectionBase::classof(const SectionBase *S) {
return S->kind() != Output;
}
OutputSection *InputSection::getParent() const {
return cast_or_null<OutputSection>(Parent);
}
@ -821,10 +817,6 @@ SyntheticSection *EhInputSection::getParent() const {
return cast_or_null<SyntheticSection>(Parent);
}
bool EhInputSection::classof(const SectionBase *S) {
return S->kind() == InputSectionBase::EHFrame;
}
// Returns the index of the first relocation that points to a region between
// Begin and Begin+Size.
template <class IntTy, class RelTy>
@ -949,10 +941,6 @@ void MergeInputSection::splitIntoPieces() {
this->getSectionPiece(Off)->Live = true;
}
bool MergeInputSection::classof(const SectionBase *S) {
return S->kind() == InputSectionBase::Merge;
}
// Do binary search to get a section piece at a given input offset.
SectionPiece *MergeInputSection::getSectionPiece(uint64_t Offset) {
auto *This = static_cast<const MergeInputSection *>(this);

View File

@ -91,7 +91,7 @@ protected:
// This corresponds to a section of an input file.
class InputSectionBase : public SectionBase {
public:
static bool classof(const SectionBase *S);
static bool classof(const SectionBase *S) { return S->kind() != Output; }
// The file this section is from.
InputFile *File;
@ -211,7 +211,7 @@ public:
template <class ELFT>
MergeInputSection(ObjFile<ELFT> *F, const typename ELFT::Shdr *Header,
StringRef Name);
static bool classof(const SectionBase *S);
static bool classof(const SectionBase *S) { return S->kind() == Merge; }
void splitIntoPieces();
// Mark the piece at a given offset live. Used by GC.
@ -281,7 +281,7 @@ public:
template <class ELFT>
EhInputSection(ObjFile<ELFT> *F, const typename ELFT::Shdr *Header,
StringRef Name);
static bool classof(const SectionBase *S);
static bool classof(const SectionBase *S) { return S->kind() == EHFrame; }
template <class ELFT> void split();
template <class ELFT, class RelTy> void split(ArrayRef<RelTy> Rels);