[llvm] [RISCV] Error out on incorrectly spelt @plt on call symbols (PR #135324)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 11 17:54:23 PDT 2025


================
@@ -2123,22 +2123,25 @@ ParseStatus RISCVAsmParser::parseCallSymbol(OperandVector &Operands) {
 
   if (getLexer().getKind() != AsmToken::Identifier)
     return ParseStatus::NoMatch;
+
   std::string Identifier(getTok().getIdentifier());
+  SMLoc E = getTok().getEndLoc();
 
   if (getLexer().peekTok().is(AsmToken::At)) {
     Lex();
     Lex();
     StringRef PLT;
+    SMLoc PLTLoc = getLoc();
     if (getParser().parseIdentifier(PLT) || PLT != "plt")
----------------
topperc wrote:

As far as I know it is supposed to be the end location of the last token parsed to create the operand. If it ever gets used, it would be for diagnostic printing with an SMRange.

https://github.com/llvm/llvm-project/pull/135324


More information about the llvm-commits mailing list