NVPTX: Replace deprecated MCExpr::print with MCAsmInfo::printExpr
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "NVPTXUtilities.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/IR/NVVMIntrinsicUtils.h"
|
||||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/MC/MCExpr.h"
|
||||
#include "llvm/MC/MCInst.h"
|
||||
#include "llvm/MC/MCInstrInfo.h"
|
||||
@@ -90,7 +91,7 @@ void NVPTXInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
|
||||
markup(O, Markup::Immediate) << formatImm(Op.getImm());
|
||||
} else {
|
||||
assert(Op.isExpr() && "Unknown operand kind in printOperand");
|
||||
Op.getExpr()->print(O, &MAI);
|
||||
MAI.printExpr(O, *Op.getExpr());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1850,7 +1850,7 @@ NVPTXAsmPrinter::lowerConstantForGV(const Constant *CV,
|
||||
}
|
||||
|
||||
void NVPTXAsmPrinter::printMCExpr(const MCExpr &Expr, raw_ostream &OS) const {
|
||||
Expr.print(OS, OutContext.getAsmInfo());
|
||||
OutContext.getAsmInfo()->printExpr(OS, Expr);
|
||||
}
|
||||
|
||||
/// PrintAsmOperand - Print out an operand for an inline asm expression.
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include "NVPTXMCExpr.h"
|
||||
#include "llvm/ADT/StringExtras.h"
|
||||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/MC/MCAssembler.h"
|
||||
#include "llvm/MC/MCContext.h"
|
||||
#include "llvm/Support/Format.h"
|
||||
@@ -64,6 +65,6 @@ NVPTXGenericMCSymbolRefExpr::create(const MCSymbolRefExpr *SymExpr,
|
||||
void NVPTXGenericMCSymbolRefExpr::printImpl(raw_ostream &OS,
|
||||
const MCAsmInfo *MAI) const {
|
||||
OS << "generic(";
|
||||
SymExpr->print(OS, MAI);
|
||||
MAI->printExpr(OS, *SymExpr);
|
||||
OS << ")";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user