[PATCH] D154276: [RISCV] Use parseDirective returning ternary status

Sergei Barannikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 1 10:57:14 PDT 2023


barannikov88 added inline comments.


================
Comment at: llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp:2975
   if (parseEOL())
-    return false;
+    return true;
   getTargetStreamer().emitDirectiveVariantCC(
----------------
jrtc27 wrote:
> Is this not a separate change?
As long as there was a error, the returned value didn't matter. Now returning false after emitting an error triggers an assertion.



================
Comment at: llvm/test/MC/RISCV/invalid-attribute.s:10
 
+.attribute unknown, "unknown"
+# CHECK: [[@LINE-1]]:12: error: attribute name not recognised: unknown
----------------
jrtc27 wrote:
> Test should probably go in separately first to show it's not a behavioural change and just a bug in the conversion(?)
I've precommitted the test, c2d7ee79.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154276/new/

https://reviews.llvm.org/D154276



More information about the llvm-commits mailing list