Make a pure function a non-member file-scoped function.
authorRui Ueyama <ruiu@google.com>
Sat, 23 Jul 2016 14:09:58 +0000 (14:09 +0000)
committerRui Ueyama <ruiu@google.com>
Sat, 23 Jul 2016 14:09:58 +0000 (14:09 +0000)
llvm-svn: 276524

lld/ELF/LinkerScript.cpp
lld/ELF/LinkerScript.h

index 7c1a0ca..e140199 100644 (file)
@@ -237,8 +237,7 @@ uint64_t ExprParser::parseExpr1(uint64_t Lhs, int MinPrec) {
 // Reads and evaluates an arithmetic expression.
 uint64_t ExprParser::parseExpr() { return parseExpr1(parsePrimary(), 0); }
 
-template <class ELFT>
-bool LinkerScript<ELFT>::isDiscarded(InputSectionBase<ELFT> *S) {
+template <class ELFT> static bool isDiscarded(InputSectionBase<ELFT> *S) {
   return !S || !S->Live;
 }
 
index 0854ff6..3bab5bd 100644 (file)
@@ -119,7 +119,6 @@ public:
   createSections(OutputSectionFactory<ELFT> &Factory);
 
   ArrayRef<uint8_t> getFiller(StringRef Name);
-  bool isDiscarded(InputSectionBase<ELFT> *S);
   bool shouldKeep(InputSectionBase<ELFT> *S);
   void assignAddresses(ArrayRef<OutputSectionBase<ELFT> *> S);
   int compareSections(StringRef A, StringRef B);