[llvm] 81d8c89 - M68k: Replace deprecated MCExpr::print with MCAsmInfo::printExpr
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 15 17:02:53 PDT 2025
Author: Fangrui Song
Date: 2025-06-15T17:02:48-07:00
New Revision: 81d8c89da056a7751f6c7714fccb30c071dbc31a
URL: https://github.com/llvm/llvm-project/commit/81d8c89da056a7751f6c7714fccb30c071dbc31a
DIFF: https://github.com/llvm/llvm-project/commit/81d8c89da056a7751f6c7714fccb30c071dbc31a.diff
LOG: M68k: Replace deprecated MCExpr::print with MCAsmInfo::printExpr
Follow-up to 18b67a7a102c0052e5ae0e76ef1297902ffeb22d
Added:
Modified:
llvm/lib/Target/M68k/MCTargetDesc/M68kInstPrinter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/M68k/MCTargetDesc/M68kInstPrinter.cpp b/llvm/lib/Target/M68k/MCTargetDesc/M68kInstPrinter.cpp
index 68ac15b57508c..778d31280adc8 100644
--- a/llvm/lib/Target/M68k/MCTargetDesc/M68kInstPrinter.cpp
+++ b/llvm/lib/Target/M68k/MCTargetDesc/M68kInstPrinter.cpp
@@ -27,6 +27,7 @@
#include "M68kBaseInfo.h"
#include "llvm/ADT/StringExtras.h"
+#include "llvm/MC/MCAsmInfo.h"
#include "llvm/MC/MCExpr.h"
#include "llvm/MC/MCInst.h"
#include "llvm/MC/MCInstrInfo.h"
@@ -68,7 +69,7 @@ void M68kInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
}
assert(MO.isExpr() && "Unknown operand kind in printOperand");
- MO.getExpr()->print(O, &MAI);
+ MAI.printExpr(O, *MO.getExpr());
}
void M68kInstPrinter::printImmediate(const MCInst *MI, unsigned opNum,
@@ -78,7 +79,7 @@ void M68kInstPrinter::printImmediate(const MCInst *MI, unsigned opNum,
O << '#' << MO.getImm();
else if (MO.isExpr()) {
O << '#';
- MO.getExpr()->print(O, &MAI);
+ MAI.printExpr(O, *MO.getExpr());
} else
llvm_unreachable("Unknown immediate kind");
}
@@ -144,7 +145,7 @@ void M68kInstPrinter::printDisp(const MCInst *MI, unsigned opNum,
return;
}
assert(Op.isExpr() && "Unknown operand kind in printOperand");
- Op.getExpr()->print(O, &MAI);
+ MAI.printExpr(O, *Op.getExpr());
}
// NOTE forcing (W,L) size available since M68020 only
@@ -153,7 +154,7 @@ void M68kInstPrinter::printAbsMem(const MCInst *MI, unsigned opNum,
const MCOperand &MO = MI->getOperand(opNum);
if (MO.isExpr()) {
- MO.getExpr()->print(O, &MAI);
+ MAI.printExpr(O, *MO.getExpr());
return;
}
More information about the llvm-commits
mailing list