[PATCH] D142865: [RISCV] Use custom operand parsing for FenceArg.
Fraser Cormack via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 30 00:29:46 PST 2023
frasercrmck accepted this revision.
frasercrmck added a comment.
This revision is now accepted and ready to land.
LGTM other than nits
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:1850
+ switch (c) {
+ default: {
+ Valid = false;
----------------
I don't think you need the braces in this statement because `Valid` was declared outside of the switch scope?
================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:1876
+ if (!Valid) {
+ TokError("operand must be formed of letters selected in-order from 'iorw' "
+ "or be 0");
----------------
Not sure it's worth it but having three uses of the exact same string made me wonder if this should be a shared variable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142865/new/
https://reviews.llvm.org/D142865
More information about the llvm-commits
mailing list