diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-06-29 05:32:09 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-06-29 05:32:09 +0000 |
| commit | 722830a51bde5cf6b96acdcfab4c836260fe0216 (patch) | |
| tree | 3b65a101036d4458a42c0059ad926c0863d76434 /lld/ELF/LinkerScript.cpp | |
| parent | df7454f94b984e2adc66df41c346c5901d71d99e (diff) | |
| download | bcm5719-llvm-722830a51bde5cf6b96acdcfab4c836260fe0216.tar.gz bcm5719-llvm-722830a51bde5cf6b96acdcfab4c836260fe0216.zip | |
Rename matchStr -> globMatch.
llvm-svn: 274103
Diffstat (limited to 'lld/ELF/LinkerScript.cpp')
| -rw-r--r-- | lld/ELF/LinkerScript.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/ELF/LinkerScript.cpp b/lld/ELF/LinkerScript.cpp index b98545746dd..c8aaffb659b 100644 --- a/lld/ELF/LinkerScript.cpp +++ b/lld/ELF/LinkerScript.cpp @@ -186,7 +186,7 @@ uint64_t ExprParser::parseExpr() { return parseExpr1(parsePrimary(), 0); } template <class ELFT> StringRef LinkerScript<ELFT>::getOutputSection(InputSectionBase<ELFT> *S) { for (SectionRule &R : Opt.Sections) - if (matchStr(R.SectionPattern, S->getSectionName())) + if (globMatch(R.SectionPattern, S->getSectionName())) return R.Dest; return ""; } @@ -199,7 +199,7 @@ bool LinkerScript<ELFT>::isDiscarded(InputSectionBase<ELFT> *S) { template <class ELFT> bool LinkerScript<ELFT>::shouldKeep(InputSectionBase<ELFT> *S) { for (StringRef Pat : Opt.KeptSections) - if (matchStr(Pat, S->getSectionName())) + if (globMatch(Pat, S->getSectionName())) return true; return false; } @@ -289,7 +289,7 @@ int LinkerScript<ELFT>::compareSections(StringRef A, StringRef B) { // Returns true if S matches T. S can contain glob meta-characters. // The asterisk ('*') matches zero or more characters, and the question // mark ('?') matches one character. -bool elf::matchStr(StringRef S, StringRef T) { +bool elf::globMatch(StringRef S, StringRef T) { for (;;) { if (S.empty()) return T.empty(); @@ -299,7 +299,7 @@ bool elf::matchStr(StringRef S, StringRef T) { // Fast path. If a pattern is '*', it matches anything. return true; for (size_t I = 0, E = T.size(); I < E; ++I) - if (matchStr(S, T.substr(I))) + if (globMatch(S, T.substr(I))) return true; return false; } |

