Skip to content

Commit 81d8c89

Browse files
committed
M68k: Replace deprecated MCExpr::print with MCAsmInfo::printExpr
Follow-up to 18b67a7
1 parent 9a87c94 commit 81d8c89

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm/lib/Target/M68k/MCTargetDesc/M68kInstPrinter.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include "M68kBaseInfo.h"
2828

2929
#include "llvm/ADT/StringExtras.h"
30+
#include "llvm/MC/MCAsmInfo.h"
3031
#include "llvm/MC/MCExpr.h"
3132
#include "llvm/MC/MCInst.h"
3233
#include "llvm/MC/MCInstrInfo.h"
@@ -68,7 +69,7 @@ void M68kInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
6869
}
6970

7071
assert(MO.isExpr() && "Unknown operand kind in printOperand");
71-
MO.getExpr()->print(O, &MAI);
72+
MAI.printExpr(O, *MO.getExpr());
7273
}
7374

7475
void M68kInstPrinter::printImmediate(const MCInst *MI, unsigned opNum,
@@ -78,7 +79,7 @@ void M68kInstPrinter::printImmediate(const MCInst *MI, unsigned opNum,
7879
O << '#' << MO.getImm();
7980
else if (MO.isExpr()) {
8081
O << '#';
81-
MO.getExpr()->print(O, &MAI);
82+
MAI.printExpr(O, *MO.getExpr());
8283
} else
8384
llvm_unreachable("Unknown immediate kind");
8485
}
@@ -144,7 +145,7 @@ void M68kInstPrinter::printDisp(const MCInst *MI, unsigned opNum,
144145
return;
145146
}
146147
assert(Op.isExpr() && "Unknown operand kind in printOperand");
147-
Op.getExpr()->print(O, &MAI);
148+
MAI.printExpr(O, *Op.getExpr());
148149
}
149150

150151
// NOTE forcing (W,L) size available since M68020 only
@@ -153,7 +154,7 @@ void M68kInstPrinter::printAbsMem(const MCInst *MI, unsigned opNum,
153154
const MCOperand &MO = MI->getOperand(opNum);
154155

155156
if (MO.isExpr()) {
156-
MO.getExpr()->print(O, &MAI);
157+
MAI.printExpr(O, *MO.getExpr());
157158
return;
158159
}
159160

0 commit comments

Comments
 (0)