summaryrefslogtreecommitdiffstats
path: root/lld/ELF/LinkerScript.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2016-04-22 00:23:52 +0000
committerRui Ueyama <ruiu@google.com>2016-04-22 00:23:52 +0000
commitc9f402eadc02d52371abb286790a0d4600e4b2d0 (patch)
treec987c6a535480907f24e3adfd5d25995ba50ebfc /lld/ELF/LinkerScript.cpp
parentd513ad88d590a29169a4108a9279c9f8708642b2 (diff)
downloadbcm5719-llvm-c9f402eadc02d52371abb286790a0d4600e4b2d0.tar.gz
bcm5719-llvm-c9f402eadc02d52371abb286790a0d4600e4b2d0.zip
Inline SectionRule::match.
This short function was used only once and didn't provide much value. llvm-svn: 267086
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
-rw-r--r--lld/ELF/LinkerScript.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp
index 43d8022af27..9fcb2f61188 100644
--- a/lld/ELF/LinkerScript.cpp
+++ b/lld/ELF/LinkerScript.cpp
@@ -165,7 +165,7 @@ uint64_t LinkerScript<ELFT>::evaluate(ArrayRef<StringRef> Tokens) {
template <class ELFT>
StringRef LinkerScript<ELFT>::getOutputSection(InputSectionBase<ELFT> *S) {
for (SectionRule &R : Opt.Sections)
- if (R.match(S))
+ if (matchStr(R.SectionPattern, S->getSectionName()))
return R.Dest;
return "";
}
@@ -296,10 +296,6 @@ static bool matchStr(StringRef S, StringRef T) {
}
}
-template <class ELFT> bool SectionRule::match(InputSectionBase<ELFT> *S) {
- return matchStr(SectionPattern, S->getSectionName());
-}
-
class elf::ScriptParser : public ScriptParserBase {
typedef void (ScriptParser::*Handler)();
OpenPOWER on IntegriCloud