summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
authorAlex Lorenz <arphaman@gmail.com>2015-08-21 21:12:44 +0000
committerAlex Lorenz <arphaman@gmail.com>2015-08-21 21:12:44 +0000
commitf22ca8ad358dfd0dcad96320f688268ea2362a72 (patch)
treeb4f6dbd00b57d520bc79e0166af2910ad3a007e3 /llvm/lib/CodeGen/MIRPrinter.cpp
parent76b91d9084a691800cbc8c05cdfe0bad311524e9 (diff)
downloadbcm5719-llvm-f22ca8ad358dfd0dcad96320f688268ea2362a72.tar.gz
bcm5719-llvm-f22ca8ad358dfd0dcad96320f688268ea2362a72.zip
MIR Serialization: Print MCSymbol operands.
This commit allows the MIR printer to print the MCSymbol machine operands. Unfortunately they can't be parsed at this time. I will create a bug that will track the fact that the MCSymbol operands can't be parsed yet. llvm-svn: 245737
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index 4b4d7b4f25c..aa3d193695a 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -27,6 +27,7 @@
#include "llvm/IR/IRPrintingPasses.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/ModuleSlotTracker.h"
+#include "llvm/MC/MCSymbol.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Support/YAMLTraits.h"
@@ -826,14 +827,14 @@ void MIPrinter::print(const MachineOperand &Op, const TargetRegisterInfo *TRI,
case MachineOperand::MO_Metadata:
Op.getMetadata()->printAsOperand(OS, MST);
break;
+ case MachineOperand::MO_MCSymbol:
+ OS << "<mcsymbol " << *Op.getMCSymbol() << ">";
+ break;
case MachineOperand::MO_CFIIndex: {
const auto &MMI = Op.getParent()->getParent()->getParent()->getMMI();
print(MMI.getFrameInstructions()[Op.getCFIIndex()], TRI);
break;
}
- default:
- // TODO: Print the other machine operands.
- llvm_unreachable("Can't print this machine operand at the moment");
}
}
OpenPOWER on IntegriCloud