diff options
author | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-14 10:02:58 +0000 |
---|---|---|
committer | Francis Visoiu Mistrih <francisvm@yahoo.com> | 2017-12-14 10:02:58 +0000 |
commit | e76c5fcd70695f3b838b868ba53471f2554e0ee6 (patch) | |
tree | bb996f6afec330eee3b622142337dc8fe75d275e /llvm/lib/CodeGen/MIRPrinter.cpp | |
parent | 753395fa0abe3b612e4b6e36c78b516ddad2b2a7 (diff) | |
download | bcm5719-llvm-e76c5fcd70695f3b838b868ba53471f2554e0ee6.tar.gz bcm5719-llvm-e76c5fcd70695f3b838b868ba53471f2554e0ee6.zip |
[CodeGen] Print external symbols as $symbol in both MIR and debug output
Work towards the unification of MIR and debug output by printing
`$symbol` instead of `<es:symbol>`.
Only debug syntax is affected.
llvm-svn: 320681
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 505b7c3b6c7..053ab607976 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -853,7 +853,8 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, case MachineOperand::MO_MachineBasicBlock: case MachineOperand::MO_ConstantPoolIndex: case MachineOperand::MO_TargetIndex: - case MachineOperand::MO_JumpTableIndex: { + case MachineOperand::MO_JumpTableIndex: + case MachineOperand::MO_ExternalSymbol: { unsigned TiedOperandIdx = 0; if (ShouldPrintRegisterTies && Op.isReg() && Op.isTied() && !Op.isDef()) TiedOperandIdx = Op.getParent()->findTiedOperandIdx(OpIdx); @@ -868,17 +869,6 @@ void MIPrinter::print(const MachineInstr &MI, unsigned OpIdx, case MachineOperand::MO_FrameIndex: printStackObjectReference(Op.getIndex()); break; - case MachineOperand::MO_ExternalSymbol: { - StringRef Name = Op.getSymbolName(); - OS << '$'; - if (Name.empty()) { - OS << "\"\""; - } else { - printLLVMNameWithoutPrefix(OS, Name); - } - printOffset(Op.getOffset()); - break; - } case MachineOperand::MO_GlobalAddress: Op.getGlobal()->printAsOperand(OS, /*PrintType=*/false, MST); printOffset(Op.getOffset()); |