diff options
-rw-r--r-- | llvm/include/llvm/CodeGen/PseudoSourceValue.h | 6 | ||||
-rw-r--r-- | llvm/lib/CodeGen/MIRPrinter.cpp | 3 |
2 files changed, 8 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/PseudoSourceValue.h b/llvm/include/llvm/CodeGen/PseudoSourceValue.h index c3f6fde9fb3..681ccb4b997 100644 --- a/llvm/include/llvm/CodeGen/PseudoSourceValue.h +++ b/llvm/include/llvm/CodeGen/PseudoSourceValue.h @@ -42,7 +42,8 @@ public: ConstantPool, FixedStack, GlobalValueCallEntry, - ExternalSymbolCallEntry + ExternalSymbolCallEntry, + TargetCustom }; private: @@ -67,6 +68,9 @@ public: bool isGOT() const { return Kind == GOT; } bool isConstantPool() const { return Kind == ConstantPool; } bool isJumpTable() const { return Kind == JumpTable; } + unsigned getTargetCustom() const { + return (Kind >= TargetCustom) ? ((Kind+1) - TargetCustom) : 0; + } /// Test whether the memory pointed to by this PseudoSourceValue has a /// constant value. diff --git a/llvm/lib/CodeGen/MIRPrinter.cpp b/llvm/lib/CodeGen/MIRPrinter.cpp index ec9414b63c1..eb13d2d3ec0 100644 --- a/llvm/lib/CodeGen/MIRPrinter.cpp +++ b/llvm/lib/CodeGen/MIRPrinter.cpp @@ -960,6 +960,9 @@ void MIPrinter::print(const MachineMemOperand &Op) { printLLVMNameWithoutPrefix( OS, cast<ExternalSymbolPseudoSourceValue>(PVal)->getSymbol()); break; + case PseudoSourceValue::TargetCustom: + llvm_unreachable("TargetCustom pseudo source values are not supported"); + break; } } printOffset(Op.getOffset()); |