summaryrefslogtreecommitdiffstats
path: root/lld/ELF/InputSection.h
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/InputSection.h')
-rw-r--r--lld/ELF/InputSection.h6
1 files changed, 3 insertions, 3 deletions
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);
OpenPOWER on IntegriCloud