From f4bd295576d6ea3fa1dc69f5ec88e45c9e369fc1 Mon Sep 17 00:00:00 2001 From: Francis Visoiu Mistrih Date: Fri, 8 Dec 2017 11:48:02 +0000 Subject: [PATCH] [CodeGen] Move printing MO_MachineBasicBlock operands to MachineOperand::print Work towards the unification of MIR and debug output by refactoring the interfaces. llvm-svn: 320141 --- llvm/lib/CodeGen/MIRPrinter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index b442dab2efb5..1250e3588bc6 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -855,7 +855,8 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, printTargetFlags(Op); switch (Op.getType()) { case MachineOperand::MO_Register: - case MachineOperand::MO_CImmediate: { + case MachineOperand::MO_CImmediate: + case MachineOperand::MO_MachineBasicBlock: { unsigned TiedOperandIdx = 0; if (ShouldPrintRegisterTies && Op.isTied() && !Op.isDef()) TiedOperandIdx = Op.getParent()->findTiedOperandIdx(OpIdx); @@ -873,9 +874,6 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, case MachineOperand::MO_FPImmediate: Op.getFPImm()->printAsOperand(OS, /*PrintType=*/true, MST); break; - case MachineOperand::MO_MachineBasicBlock: - OS << printMBBReference(*Op.getMBB()); - break; case MachineOperand::MO_FrameIndex: printStackObjectReference(Op.getIndex()); break;