[lld] [lld][ELF] removed peek2 in linker script lexer (PR #99539)
Hongyu Chen via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 18 14:53:27 PDT 2024
yugier wrote:
> We should not add the peek2 ability to `peek`. Instead, the call site should check whether the first token is `(`, and if yes, peek another token to check `NOLOAD/COPY/INFO/TYPE`. Basically, we move some `"("` code from `readSectionDirective` to the caller.
I wanted to do this but it seems like once `isDirective == false` we need call `readExpr` and `readExpr` calls `readPrimary` . If we consume `(` forreadSectionDirective then we might have to change `readExpr` and `readPrimary`.
https://github.com/llvm/llvm-project/pull/99539
More information about the llvm-commits
mailing list