diff options
author | Fangrui Song <i@maskray.me> | 2025-06-15 16:55:45 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2025-06-15 16:55:45 -0700 |
commit | 489dcc9e5233b52152272e6e5377784a56a12f1d (patch) | |
tree | 8bf10e9eab1abf9374d79238c197d0e6dd5038d6 | |
parent | f11dd116e0aa8cf35bdb82dba0a3a926538c05c2 (diff) | |
download | llvm-489dcc9e5233b52152272e6e5377784a56a12f1d.zip llvm-489dcc9e5233b52152272e6e5377784a56a12f1d.tar.gz llvm-489dcc9e5233b52152272e6e5377784a56a12f1d.tar.bz2 |
AArch64: Replace MCExpr::print with MCAsmInfo::printExpr
Follow-up to 18b67a7a102c0052e5ae0e76ef1297902ffeb22d
-rw-r--r-- | llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp index 9d9e23e..bbe8382 100644 --- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp +++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.cpp @@ -278,7 +278,7 @@ void AArch64InstPrinter::printInst(const MCInst *MI, uint64_t Address, { WithMarkup M = markup(O, Markup::Immediate); O << "#"; - MI->getOperand(1).getExpr()->print(O, &MAI); + MAI.printExpr(O, *MI->getOperand(1).getExpr()); } return; } @@ -291,7 +291,7 @@ void AArch64InstPrinter::printInst(const MCInst *MI, uint64_t Address, { WithMarkup M = markup(O, Markup::Immediate); O << "#"; - MI->getOperand(2).getExpr()->print(O, &MAI); + MAI.printExpr(O, *MI->getOperand(2).getExpr()); } return; } @@ -1163,7 +1163,7 @@ void AArch64InstPrinter::printOperand(const MCInst *MI, unsigned OpNo, printImm(MI, OpNo, STI, O); } else { assert(Op.isExpr() && "unknown operand kind in printOperand"); - Op.getExpr()->print(O, &MAI); + MAI.printExpr(O, *Op.getExpr()); } } @@ -1240,7 +1240,7 @@ void AArch64InstPrinter::printAddSubImm(const MCInst *MI, unsigned OpNum, } } else { assert(MO.isExpr() && "Unexpected operand type!"); - MO.getExpr()->print(O, &MAI); + MAI.printExpr(O, *MO.getExpr()); printShifter(MI, OpNum + 1, STI, O); } } @@ -1431,7 +1431,7 @@ void AArch64InstPrinter::printUImm12Offset(const MCInst *MI, unsigned OpNum, markup(O, Markup::Immediate) << '#' << formatImm(MO.getImm() * Scale); } else { assert(MO.isExpr() && "Unexpected operand type!"); - MO.getExpr()->print(O, &MAI); + MAI.printExpr(O, *MO.getExpr()); } } @@ -1446,7 +1446,7 @@ void AArch64InstPrinter::printAMIndexedWB(const MCInst *MI, unsigned OpNum, } else { assert(MO1.isExpr() && "Unexpected operand type!"); O << ", "; - MO1.getExpr()->print(O, &MAI); + MAI.printExpr(O, *MO1.getExpr()); } O << ']'; } @@ -1805,7 +1805,7 @@ void AArch64InstPrinter::printAlignedLabel(const MCInst *MI, uint64_t Address, markup(O, Markup::Target) << formatHex((uint64_t)TargetAddress); } else { // Otherwise, just print the expression. - MI->getOperand(OpNum).getExpr()->print(O, &MAI); + MAI.printExpr(O, *MI->getOperand(OpNum).getExpr()); } } @@ -1832,7 +1832,7 @@ void AArch64InstPrinter::printAdrAdrpLabel(const MCInst *MI, uint64_t Address, } // Otherwise, just print the expression. - MI->getOperand(OpNum).getExpr()->print(O, &MAI); + MAI.printExpr(O, *MI->getOperand(OpNum).getExpr()); } void AArch64InstPrinter::printBarrierOption(const MCInst *MI, unsigned OpNo, |