[PATCH] D57319: [RISCV] Fix failure to parse parenthesized immediates
Lewis Revill via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 28 06:03:05 PST 2019
lewis-revill added a comment.
In D57319#1373436 <https://reviews.llvm.org/D57319#1373436>, @jrtc27 wrote:
> You should save the original `AsmToken` rather than reconstructing it, so as to retain the `SMLoc`, and `Buf` no longer needs to be at function scope. Also, I had some more exhaustive tests in mine <https://github.com/jrtc27/llvm/commit/ffa4f12c26e7afb1fdfd5a1eb5e1de749b85b099>; I think the important one is `addi a1, a0, (1)` to ensure that we can parse parenthesised immediate expressions when *not* part of a memory reference.
That sounds like a good approach. It really wasn't possible that LParen could ever be in the buffer given the way 'peekTokens' works.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D57319/new/
https://reviews.llvm.org/D57319
More information about the llvm-commits
mailing list