forked from OSchip/llvm-project
[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
This commit is contained in:
parent
6c4ca713f1
commit
f4bd295576
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue