diff options
| author | Rui Ueyama <ruiu@google.com> | 2017-10-01 23:46:31 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2017-10-01 23:46:31 +0000 |
| commit | 43ca7167ad74fc49e75989db2830236d260c52e4 (patch) | |
| tree | 992dec70962473e7d841f8c17a1f4a4b6b288024 | |
| parent | c013399197def0dbf119a0a7e9a146f8b54368cc (diff) | |
| download | bcm5719-llvm-43ca7167ad74fc49e75989db2830236d260c52e4.tar.gz bcm5719-llvm-43ca7167ad74fc49e75989db2830236d260c52e4.zip | |
Inline hot functions.
llvm-svn: 314637
| -rw-r--r-- | lld/ELF/InputSection.cpp | 12 | ||||
| -rw-r--r-- | lld/ELF/InputSection.h | 6 |
2 files changed, 3 insertions, 15 deletions
diff --git a/lld/ELF/InputSection.cpp b/lld/ELF/InputSection.cpp index 98751aa6182..ba95aaa720b 100644 --- a/lld/ELF/InputSection.cpp +++ b/lld/ELF/InputSection.cpp @@ -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); diff --git a/lld/ELF/InputSection.h b/lld/ELF/InputSection.h index 15436dfd37b..8cc644b535e 100644 --- a/lld/ELF/InputSection.h +++ b/lld/ELF/InputSection.h @@ -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); |

