[lld] r314637 - Inline hot functions.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 1 16:46:31 PDT 2017
Author: ruiu
Date: Sun Oct 1 16:46:31 2017
New Revision: 314637
URL: http://llvm.org/viewvc/llvm-project?rev=314637&view=rev
Log:
Inline hot functions.
Modified:
lld/trunk/ELF/InputSection.cpp
lld/trunk/ELF/InputSection.h
Modified: lld/trunk/ELF/InputSection.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.cpp?rev=314637&r1=314636&r2=314637&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.cpp (original)
+++ lld/trunk/ELF/InputSection.cpp Sun Oct 1 16:46:31 2017
@@ -348,10 +348,6 @@ bool InputSection::classof(const Section
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::getPar
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);
Modified: lld/trunk/ELF/InputSection.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/InputSection.h?rev=314637&r1=314636&r2=314637&view=diff
==============================================================================
--- lld/trunk/ELF/InputSection.h (original)
+++ lld/trunk/ELF/InputSection.h Sun Oct 1 16:46:31 2017
@@ -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);
More information about the llvm-commits
mailing list