summaryrefslogtreecommitdiff
path: root/lld/ELF/ScriptParser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/ScriptParser.cpp')
-rw-r--r--lld/ELF/ScriptParser.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lld/ELF/ScriptParser.cpp b/lld/ELF/ScriptParser.cpp
index 49aa7e637490..8637a8b0b216 100644
--- a/lld/ELF/ScriptParser.cpp
+++ b/lld/ELF/ScriptParser.cpp
@@ -1719,20 +1719,20 @@ ScriptParser::readSymbols() {
while (!errorCount()) {
if (consume("}"))
break;
- if (consumeLabel("local")) {
- v = &locals;
- continue;
- }
- if (consumeLabel("global")) {
- v = &globals;
- continue;
- }
if (consume("extern")) {
SmallVector<SymbolVersion, 0> ext = readVersionExtern();
v->insert(v->end(), ext.begin(), ext.end());
} else {
StringRef tok = next();
+ if (tok == "local:" || (tok == "local" && consume(":"))) {
+ v = &locals;
+ continue;
+ }
+ if (tok == "global:" || (tok == "global" && consume(":"))) {
+ v = &globals;
+ continue;
+ }
v->push_back({unquote(tok), false, hasWildcard(tok)});
}
expect(";");