summaryrefslogtreecommitdiffstats
path: root/lld/ELF/ScriptParser.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2017-07-13 20:30:35 +0000
committerRui Ueyama <ruiu@google.com>2017-07-13 20:30:35 +0000
commit1e77ad14565b2a27c2b07392730b5ec93fe496bb (patch)
treeadf4406b47962acaa40031e349b64e92b2dfd177 /lld/ELF/ScriptParser.cpp
parent3b8acb2c5adc828c26ab2a738767a027ffbfed72 (diff)
downloadbcm5719-llvm-1e77ad14565b2a27c2b07392730b5ec93fe496bb.tar.gz
bcm5719-llvm-1e77ad14565b2a27c2b07392730b5ec93fe496bb.zip
Move feature-specific functions out of Strings.cpp.
Functions declared in Strings.h should provide generic string operations for the linker, but some of them are too specific to some features. This patch moves them to the location where they are used. llvm-svn: 307949
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
-rw-r--r--lld/ELF/ScriptParser.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp
index 72940ca0cfd..b3847081697 100644
--- a/lld/ELF/ScriptParser.cpp
+++ b/lld/ELF/ScriptParser.cpp
@@ -113,6 +113,12 @@ private:
};
} // namespace
+static StringRef unquote(StringRef S) {
+ if (S.startswith("\""))
+ return S.substr(1, S.size() - 2);
+ return S;
+}
+
static bool isUnderSysroot(StringRef Path) {
if (Config->Sysroot == "")
return false;
@@ -1103,6 +1109,10 @@ void ScriptParser::readVersionDeclaration(StringRef VerStr) {
expect(";");
}
+static bool hasWildcard(StringRef S) {
+ return S.find_first_of("?*[") != StringRef::npos;
+}
+
// Reads a list of symbols, e.g. "{ global: foo; bar; local: *; };".
std::pair<std::vector<SymbolVersion>, std::vector<SymbolVersion>>
ScriptParser::readSymbols() {
OpenPOWER on IntegriCloud