diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-14 10:03:23 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-14 10:03:23 +0000 |
commit | 3c99371c6e6be9f79226f2798e136109da937ab1 (patch) | |
tree | f6527367fe322f346504638ac1e5a571c0a662b4 /llvm/lib/CodeGen | |
parent | 2db59382db874146e7bc53c490188ca2767078f6 (diff) | |
download | bcm5719-llvm-3c99371c6e6be9f79226f2798e136109da937ab1.tar.gz bcm5719-llvm-3c99371c6e6be9f79226f2798e136109da937ab1.zip |
[CodeGen] Print MCSymbol operands as <mcsymbol sym> in both MIR and debug output
Work towards the unification of MIR and debug output by printing
`<mcsymbol sym>` instead of `<MCSym=sym>`.
Only debug syntax is affected.
llvm-svn: 320685
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MachineOperand.cpp | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 723e57b4444..ac94e96bea8 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -799,7 +799,8 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, case MachineOperand::MO_ExternalSymbol: case MachineOperand::MO_GlobalAddress: case MachineOperand::MO_RegisterLiveOut: - case MachineOperand::MO_Metadata: { + case MachineOperand::MO_Metadata: + case MachineOperand::MO_MCSymbol: { unsigned TiedOperandIdx = 0; if (ShouldPrintRegisterTies && Op.isReg() && Op.isTied() && !Op.isDef()) TiedOperandIdx = Op.getParent()->findTiedOperandIdx(OpIdx); @@ -831,9 +832,6 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, printCustomRegMask(Op.getRegMask(), OS, TRI); break; } - case MachineOperand::MO_MCSymbol: - OS << "<mcsymbol " << *Op.getMCSymbol() << ">"; - break; case MachineOperand::MO_CFIIndex: { const MachineFunction &MF = *Op.getParent()->getMF(); print(MF.getFrameInstructions()[Op.getCFIIndex()], TRI); diff --git a/llvm/lib/CodeGen/MachineOperand.cpp b/llvm/lib/CodeGen/MachineOperand.cpp index a1ae5d396c2..1640d57eb48 100644 --- a/llvm/lib/CodeGen/MachineOperand.cpp +++ b/llvm/lib/CodeGen/MachineOperand.cpp @@ -660,7 +660,7 @@ void MachineOperand::print(raw_ostream &OS, ModuleSlotTracker &MST, getMetadata()->printAsOperand(OS, MST); break; case MachineOperand::MO_MCSymbol: - OS << "<MCSym=" << *getMCSymbol() << '>'; + OS << "<mcsymbol " << *getMCSymbol() << ">"; break; case MachineOperand::MO_CFIIndex: OS << "<call frame instruction>"; |