[PATCH] D65190: [X86] X86ATTInstPrinter: replace markup with startMarkup/endMarkup

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 08:05:28 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp:379-381
+    O << startMarkup(MarkupType::Imm) << '$';
     Op.getExpr()->print(O, &MAI);
+    O << endMarkup();
----------------
No need for this to be part of this change, but I find it slightly odd that you can't use the withMarkup pattern here. I take it that making the print function return a stream wouldn't be straightforward?


================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp:415-416
       if (ScaleVal != 1) {
-        O << ',' << markup("<imm:") << ScaleVal // never printed in hex.
-          << markup(">");
+        O << ',';
+        withMarkup(O, MarkupType::Imm) << ScaleVal; // never printed in hex.
       }
----------------
Could you do the following?

`O << ',' << withMarkup(O, MarkupType::Imm) << ScaleVal;`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65190





More information about the llvm-commits mailing list