summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-14 10:03:18 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-14 10:03:18 +0000
commit2db59382db874146e7bc53c490188ca2767078f6 (patch)
treed9f33ce28364235caf4a5eae2dbe8d25dd1dfbf5 /llvm/lib/CodeGen
parentbdaf8bfa99830bad36c9833ca6a661294fb27577 (diff)
downloadbcm5719-llvm-2db59382db874146e7bc53c490188ca2767078f6.tar.gz
bcm5719-llvm-2db59382db874146e7bc53c490188ca2767078f6.zip
[CodeGen] Move printing MO_Metadata operands to MachineOperand::print
Work towards the unification of MIR and debug output by refactoring the interfaces. llvm-svn: 320684
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp6
-rw-r--r--llvm/lib/CodeGen/MachineOperand.cpp2
2 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index fcf59adb7b3..723e57b4444 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -798,7 +798,8 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx,
case MachineOperand::MO_JumpTableIndex:
case MachineOperand::MO_ExternalSymbol:
case MachineOperand::MO_GlobalAddress:
- case MachineOperand::MO_RegisterLiveOut: {
+ case MachineOperand::MO_RegisterLiveOut:
+ case MachineOperand::MO_Metadata: {
unsigned TiedOperandIdx = 0;
if (ShouldPrintRegisterTies && Op.isReg() && Op.isTied() && !Op.isDef())
TiedOperandIdx = Op.getParent()->findTiedOperandIdx(OpIdx);
@@ -830,9 +831,6 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx,
printCustomRegMask(Op.getRegMask(), OS, TRI);
break;
}
- case MachineOperand::MO_Metadata:
- Op.getMetadata()->printAsOperand(OS, MST);
- break;
case MachineOperand::MO_MCSymbol:
OS << "<mcsymbol " << *Op.getMCSymbol() << ">";
break;
diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp
index 009722b981a..a1ae5d396c2 100644
--- a/llvm/lib/CodeGen/MachineOperand.cpp
+++ b/llvm/lib/CodeGen/MachineOperand.cpp
@@ -657,9 +657,7 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST,
break;
}
case MachineOperand::MO_Metadata:
- OS << '<';
getMetadata()->printAsOperand(OS, MST);
- OS << '>';
break;
case MachineOperand::MO_MCSymbol:
OS << "<MCSym=" << *getMCSymbol() << '>';
OpenPOWER on IntegriCloud