diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-08 11:40:06 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-08 11:40:06 +0000 |
commit | 6c4ca713f1a9763b3312d5488553f2adff54fefe (patch) | |
tree | d5d5b7039e39caac1a06b70a2b881750448f899f /llvm/lib/CodeGen/MIRPrinter.cpp | |
parent | 5a6d57c75f7b1bbbaa33d0e437fc26c73c1d6150 (diff) | |
download | bcm5719-llvm-6c4ca713f1a9763b3312d5488553f2adff54fefe.tar.gz bcm5719-llvm-6c4ca713f1a9763b3312d5488553f2adff54fefe.zip |
[CodeGen] Move printing MO_CImmediate operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the
interfaces.
llvm-svn: 320140
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index e8a358e5209..b442dab2efb 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -854,7 +854,8 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, const MachineOperand &Op = MI.getOperand(OpIdx); printTargetFlags(Op); switch (Op.getType()) { - case MachineOperand::MO_Register: { + case MachineOperand::MO_Register: + case MachineOperand::MO_CImmediate: { unsigned TiedOperandIdx = 0; if (ShouldPrintRegisterTies && Op.isTied() && !Op.isDef()) TiedOperandIdx = Op.getParent()->findTiedOperandIdx(OpIdx); @@ -869,9 +870,6 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, else OS << Op.getImm(); break; - case MachineOperand::MO_CImmediate: - Op.getCImm()->printAsOperand(OS, /*PrintType=*/true, MST); - break; case MachineOperand::MO_FPImmediate: Op.getFPImm()->printAsOperand(OS, /*PrintType=*/true, MST); break; |