[llvm] 2d696d0 - [llvm] Migrate NVPTXInstPrinter to WithMarkup
Jonas Devlieghere via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 1 15:26:31 PDT 2023
Author: Jonas Devlieghere
Date: 2023-09-01T15:26:26-07:00
New Revision: 2d696d0458ef395fcd61a20b6fd887b74ce9d04e
URL: https://github.com/llvm/llvm-project/commit/2d696d0458ef395fcd61a20b6fd887b74ce9d04e
DIFF: https://github.com/llvm/llvm-project/commit/2d696d0458ef395fcd61a20b6fd887b74ce9d04e.diff
LOG: [llvm] Migrate NVPTXInstPrinter to WithMarkup
There's only one call to markup in NVPTXInstPrinter. Replace it with the
new overload that uses WithMarkup.
Added:
Modified:
llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp b/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
index 07c56ac79a63a0..5d27accdc198c1 100644
--- a/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
+++ b/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.cpp
@@ -82,7 +82,7 @@ void NVPTXInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
unsigned Reg = Op.getReg();
printRegName(O, Reg);
} else if (Op.isImm()) {
- O << markup("<imm:") << formatImm(Op.getImm()) << markup(">");
+ markup(O, Markup::Immediate) << formatImm(Op.getImm());
} else {
assert(Op.isExpr() && "Unknown operand kind in printOperand");
Op.getExpr()->print(O, &MAI);
More information about the llvm-commits
mailing list