[llvm] [llvm] Adopt WithMarkup in the MIPS backend (PR #65384)

Jonas Devlieghere via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 12:51:27 PDT 2023


================
@@ -213,12 +213,11 @@ void MipsInstPrinter::printMemOperand(const MCInst *MI, int opNum,
     break;
   }
 
-  O << markup("<mem:");
+  WithMarkup M = markup(O, Markup::Memory);
----------------
JDevlieghere wrote:

Yeah, something like `make_shoped_markup` would've been clearer at the cost of being more verbose. Given that most uses use operator `<<` I decided to prioritize readability for those cases. 

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


More information about the llvm-commits mailing list