summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MIRPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r--llvm/lib/CodeGen/MIRPrinter.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp
index aa3d193695a..05bb320d8e6 100644
--- a/llvm/lib/CodeGen/MIRPrinter.cpp
+++ b/llvm/lib/CodeGen/MIRPrinter.cpp
@@ -613,17 +613,18 @@ void MIPrinter::printIRValueReference(const Value &V) {
V.printAsOperand(OS, /*PrintType=*/false, MST);
return;
}
+ if (isa<Constant>(V)) {
+ // Machine memory operands can load/store to/from constant value pointers.
+ OS << '`';
+ V.printAsOperand(OS, /*PrintType=*/true, MST);
+ OS << '`';
+ return;
+ }
OS << "%ir.";
if (V.hasName()) {
printLLVMNameWithoutPrefix(OS, V.getName());
return;
}
- if (isa<Constant>(V)) {
- // Machine memory operands can load/store to/from constant value pointers.
- // TODO: Serialize the constant values.
- OS << "<unserializable ir value>";
- return;
- }
printIRSlotNumber(OS, MST.getLocalSlot(&V));
}
OpenPOWER on IntegriCloud