mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
MCInst: Add ::dump_pretty.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99216 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -623,24 +623,10 @@ void MCAsmStreamer::EmitInstruction(const MCInst &Inst) {
|
||||
AddEncodingComment(Inst);
|
||||
|
||||
// Show the MCInst if enabled.
|
||||
if (ShowInst) {
|
||||
raw_ostream &OS = GetCommentOS();
|
||||
OS << "<MCInst #" << Inst.getOpcode();
|
||||
|
||||
StringRef InstName;
|
||||
if (InstPrinter)
|
||||
InstName = InstPrinter->getOpcodeName(Inst.getOpcode());
|
||||
if (!InstName.empty())
|
||||
OS << ' ' << InstName;
|
||||
|
||||
for (unsigned i = 0, e = Inst.getNumOperands(); i != e; ++i) {
|
||||
OS << "\n ";
|
||||
Inst.getOperand(i).print(OS, &MAI);
|
||||
}
|
||||
OS << ">\n";
|
||||
}
|
||||
if (ShowInst)
|
||||
Inst.dump_pretty(GetCommentOS(), &MAI, InstPrinter.get(), "\n ");
|
||||
|
||||
// If we have an AsmPrinter, use that to print, otherwise dump the MCInst.
|
||||
// If we have an AsmPrinter, use that to print, otherwise print the MCInst.
|
||||
if (InstPrinter)
|
||||
InstPrinter->printInst(&Inst);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user