Replace deprecated MCExpr::print with MCAsmInfo::printExpr
This commit is contained in:
@@ -195,7 +195,7 @@ std::string createRetpolineFunctionTag(BinaryContext &BC,
|
||||
|
||||
TagOS << "+";
|
||||
if (MemRef.DispExpr)
|
||||
MemRef.DispExpr->print(TagOS, BC.AsmInfo.get());
|
||||
BC.AsmInfo->printExpr(TagOS, *MemRef.DispExpr);
|
||||
else
|
||||
TagOS << MemRef.DispImm;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ void MSP430InstPrinter::printPCRelImmOperand(const MCInst *MI, unsigned OpNo,
|
||||
O << Imm;
|
||||
} else {
|
||||
assert(Op.isExpr() && "unknown pcrel immediate operand");
|
||||
Op.getExpr()->print(O, &MAI);
|
||||
MAI.printExpr(O, *Op.getExpr());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ void MSP430InstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
|
||||
} else {
|
||||
assert(Op.isExpr() && "unknown operand kind in printOperand");
|
||||
O << '#';
|
||||
Op.getExpr()->print(O, &MAI);
|
||||
MAI.printExpr(O, *Op.getExpr());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ void MSP430InstPrinter::printSrcMemOperand(const MCInst *MI, unsigned OpNo,
|
||||
O << '&';
|
||||
|
||||
if (Disp.isExpr())
|
||||
Disp.getExpr()->print(O, &MAI);
|
||||
MAI.printExpr(O, *Disp.getExpr());
|
||||
else {
|
||||
assert(Disp.isImm() && "Expected immediate in displacement field");
|
||||
O << Disp.getImm();
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "llvm/ADT/APFloat.h"
|
||||
#include "llvm/ADT/SmallSet.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"
|
||||
@@ -344,7 +345,7 @@ void WebAssemblyInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
|
||||
auto &Sym = static_cast<const MCSymbolWasm &>(SRE->getSymbol());
|
||||
O << WebAssembly::signatureToString(Sym.getSignature());
|
||||
} else {
|
||||
Op.getExpr()->print(O, &MAI);
|
||||
MAI.printExpr(O, *Op.getExpr());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ void XtensaInstPrinter::printCallOperand(const MCInst *MI, uint64_t Address,
|
||||
O << Val;
|
||||
}
|
||||
} else if (MC.isExpr())
|
||||
MC.getExpr()->print(O, &MAI);
|
||||
MAI.printExpr(O, *MC.getExpr());
|
||||
else
|
||||
llvm_unreachable("Invalid operand");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user