Index: include/llvm/CodeGen/PseudoSourceValue.h =================================================================== --- include/llvm/CodeGen/PseudoSourceValue.h +++ include/llvm/CodeGen/PseudoSourceValue.h @@ -40,7 +40,8 @@ ConstantPool, FixedStack, GlobalValueCallEntry, - ExternalSymbolCallEntry + ExternalSymbolCallEntry, + TargetCustom }; private: @@ -63,6 +64,9 @@ 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. Index: lib/CodeGen/MIRPrinter.cpp =================================================================== --- lib/CodeGen/MIRPrinter.cpp +++ lib/CodeGen/MIRPrinter.cpp @@ -892,6 +892,9 @@ printLLVMNameWithoutPrefix( OS, cast(PVal)->getSymbol()); break; + case PseudoSourceValue::TargetCustom: + llvm_unreachable("TargetCustom pseudo source values are not supported"); + break; } } printOffset(Op.getOffset());