diff options
Diffstat (limited to 'llvm/lib/CodeGen/MIRPrinter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index 8b54a981f8e..d47ed979689 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -704,9 +704,21 @@ void MIPrinter::print(const MachineMemOperand &Op) { OS << "store "; } OS << Op.getSize() << (Op.isLoad() ? " from " : " into "); - if (const Value *Val = Op.getValue()) + if (const Value *Val = Op.getValue()) { printIRValueReference(*Val); - // TODO: Print PseudoSourceValue. + } else { + const PseudoSourceValue *PVal = Op.getPseudoValue(); + assert(PVal && "Expected a pseudo source value"); + switch (PVal->kind()) { + case PseudoSourceValue::ConstantPool: + OS << "constant-pool"; + break; + default: + // TODO: Print the other pseudo source values. + OS << "<unserializable pseudo value>"; + break; + } + } printOffset(Op.getOffset()); if (Op.getBaseAlignment() != Op.getSize()) OS << ", align " << Op.getBaseAlignment(); |