[lld] r276524 - Make a pure function a non-member file-scoped function.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 23 07:09:59 PDT 2016
Author: ruiu
Date: Sat Jul 23 09:09:58 2016
New Revision: 276524
URL: http://llvm.org/viewvc/llvm-project?rev=276524&view=rev
Log:
Make a pure function a non-member file-scoped function.
Modified:
lld/trunk/ELF/LinkerScript.cpp
lld/trunk/ELF/LinkerScript.h
Modified: lld/trunk/ELF/LinkerScript.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.cpp?rev=276524&r1=276523&r2=276524&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.cpp (original)
+++ lld/trunk/ELF/LinkerScript.cpp Sat Jul 23 09:09:58 2016
@@ -237,8 +237,7 @@ uint64_t ExprParser::parseExpr1(uint64_t
// 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;
}
Modified: lld/trunk/ELF/LinkerScript.h
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/LinkerScript.h?rev=276524&r1=276523&r2=276524&view=diff
==============================================================================
--- lld/trunk/ELF/LinkerScript.h (original)
+++ lld/trunk/ELF/LinkerScript.h Sat Jul 23 09:09:58 2016
@@ -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);
More information about the llvm-commits
mailing list