[llvm] [MC][RISCV] Add assembly syntax highlighting for RISCV (PR #65853)

Jessica Clarke via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 9 11:38:46 PDT 2023


================
@@ -208,19 +209,20 @@ void RISCVInstPrinter::printVTypeI(const MCInst *MI, unsigned OpNo,
 void RISCVInstPrinter::printRlist(const MCInst *MI, unsigned OpNo,
                                   const MCSubtargetInfo &STI, raw_ostream &O) {
   unsigned Imm = MI->getOperand(OpNo).getImm();
-  O << "{";
+  auto OS = markup(O, Markup::Register);
+  OS << "{";
----------------
jrtc27 wrote:

Should the range syntax parts (braces, dash and comma) really be marked up like registers themselves? I’d expect separate markup for them.

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


More information about the llvm-commits mailing list