summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
authorFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-14 10:02:58 +0000
committerFrancis Visoiu Mistrih <francisvm@yahoo.com>2017-12-14 10:02:58 +0000
commite76c5fcd70695f3b838b868ba53471f2554e0ee6 (patch)
treebb996f6afec330eee3b622142337dc8fe75d275e /llvm/lib/CodeGen/MIRPrinter.cpp
parent753395fa0abe3b612e4b6e36c78b516ddad2b2a7 (diff)
downloadbcm5719-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.cpp14
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());
OpenPOWER on IntegriCloud