From 5d34ad79b4eec963a73b5c80bf5e323db196788c Mon Sep 17 00:00:00 2001 From: Shankar Easwaran Date: Sat, 14 Mar 2015 19:41:24 +0000 Subject: Revert "[ELF] Change few static functions." This reverts commit r232253. Fix comments from dblaikie. Since these functions dont access member state, its ok to be static. llvm-svn: 232271 --- lld/lib/ReaderWriter/ELF/DefaultLayout.h | 2 +- lld/lib/ReaderWriter/ELF/OutputELFWriter.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lld/lib/ReaderWriter') diff --git a/lld/lib/ReaderWriter/ELF/DefaultLayout.h b/lld/lib/ReaderWriter/ELF/DefaultLayout.h index 3ff7dde1598..49ada5937ff 100644 --- a/lld/lib/ReaderWriter/ELF/DefaultLayout.h +++ b/lld/lib/ReaderWriter/ELF/DefaultLayout.h @@ -193,7 +193,7 @@ public: /// \brief Returns true/false depending on whether the section has a Output // segment or not - bool hasOutputSegment(Section *section); + static bool hasOutputSegment(Section *section); // Adds an atom to the section ErrorOr addAtom(const Atom *atom) override; diff --git a/lld/lib/ReaderWriter/ELF/OutputELFWriter.h b/lld/lib/ReaderWriter/ELF/OutputELFWriter.h index 97121d15853..b44da49402f 100644 --- a/lld/lib/ReaderWriter/ELF/OutputELFWriter.h +++ b/lld/lib/ReaderWriter/ELF/OutputELFWriter.h @@ -207,7 +207,7 @@ protected: /// @} private: - StringRef maybeGetSOName(Node *node); + static StringRef maybeGetSOName(Node *node); }; //===----------------------------------------------------------------------===// @@ -359,7 +359,7 @@ void OutputELFWriter::assignSectionsWithNoSegments() { _layout.assignFileOffsetsForMiscSections(); for (auto sec : _layout.sections()) if (auto section = dyn_cast>(sec)) - if (!_layout.hasOutputSegment(section)) + if (!DefaultLayout::hasOutputSegment(section)) _shdrtab->updateSection(section); } -- cgit v1.2.3