[llvm-branch-commits] [RISCV] Replace @plt/@gotpcrel in data directives with %pltpcrel %gotpcrel (PR #132569)
Sam Elliott via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Mar 27 18:01:00 PDT 2025
================
@@ -2233,8 +2235,17 @@ ParseStatus RISCVAsmParser::parseOperandWithSpecifier(OperandVector &Operands) {
SMLoc S = getLoc();
SMLoc E;
- if (!parseOptionalToken(AsmToken::Percent) ||
- getLexer().getKind() != AsmToken::Identifier)
+ if (!parseOptionalToken(AsmToken::Percent))
+ return Error(getLoc(), "expected '%' relocation specifier");
----------------
lenary wrote:
Nit: this means the % is not optional, is there maybe a better way to write this?
```suggestion
if (parseToken(AsmToken::Percent, "expected '%' relocation specifier"))
return ParseStatus::Failure;
```
maybe?
https://github.com/llvm/llvm-project/pull/132569
More information about the llvm-branch-commits
mailing list