[lld] [lld][ELF] remove `consumeLabel` in ScriptLexer (PR #99567)
Hongyu Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 15:10:55 PDT 2024
================
@@ -1692,11 +1692,11 @@ ScriptParser::readSymbols() {
while (!errorCount()) {
if (consume("}"))
break;
- if (consumeLabel("local")) {
+ if (consume("local:") || (consume("local") && consume(":"))) {
v = &locals;
continue;
}
- if (consumeLabel("global")) {
+ if (consume("global:") || (consume("global") && consume(":"))) {
----------------
yugier wrote:
Sorry I am confused here why we need check `local:` and `global` below `StringRef tok = next();` ? if the lexer didn't consume `global:`, `global : `, `local:`, `local : `, or `extern`, we do not need do other things for the symbol right? Please correct me if I understand here wrong. Thank you!
https://github.com/llvm/llvm-project/pull/99567
More information about the llvm-commits
mailing list