]> granicus.if.org Git - llvm/commitdiff
[CodeGen] Move printing MO_MachineBasicBlock operands to MachineOperand::print
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>
Fri, 8 Dec 2017 11:48:02 +0000 (11:48 +0000)
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>
Fri, 8 Dec 2017 11:48:02 +0000 (11:48 +0000)
Work towards the unification of MIR and debug output by refactoring the
interfaces.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@320141 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MIRPrinter.cpp

index b442dab2efb5233a1f6448169d4c97d07e3d7578..1250e3588bc628dc34991190fd0f6854b468bf80 100644 (file)
@@ -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;