[llvm] [AArch64][SVE]Add error message in the AsmParser for SVEPattern (PR #82668)

Maciej Gabka via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 11:27:54 PST 2024


================
@@ -7939,7 +7939,7 @@ ParseStatus AArch64AsmParser::tryParseSVEPattern(OperandVector &Operands) {
 
     auto *MCE = dyn_cast<MCConstantExpr>(ImmVal);
     if (!MCE)
-      return ParseStatus::Failure;
+      return TokError("expected immediate operand");
----------------
mgabka wrote:

since this function seems to parse a specific enum value, would not be better to emit a more specific error?

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


More information about the llvm-commits mailing list