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

Seiya Nuta via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 01:39:35 PDT 2019


seiya marked an inline comment as done.
seiya added a comment.

In D65190#1599038 <https://reviews.llvm.org/D65190#1599038>, @jhenderson wrote:

> Is `markup()` still needed after this change?


Yes we cannot remove `markup()` because it is used in other printers. ARMInstPrinter for example.



================
Comment at: llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.cpp:41-42
 
+// Since printRegName is a const method, we need this non-const version to
+// update MarkupState and MarkupSpans.
+void X86ATTInstPrinter::printMarkedUpRegName(raw_ostream &OS, unsigned RegNo) {
----------------
jhenderson wrote:
> Could printRegName just be made non-const?
We can't make it non-const because printRegName is defined as a virtual const function in MCInstPrinter. How about marking MarkupState `mutable` instead?


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