diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-03-28 20:33:12 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-03-28 20:33:12 +0000 |
commit | 323b021b5e16f2bd66239464855c345b9f599f12 (patch) | |
tree | c0b0afba793592f06cd4b9d6db1a6c25c6a67abb /llvm/lib/CodeGen/PseudoSourceValue.cpp | |
parent | 3230e4be11e7883239f897f618f9f0fe39f5c256 (diff) | |
download | bcm5719-llvm-323b021b5e16f2bd66239464855c345b9f599f12.tar.gz bcm5719-llvm-323b021b5e16f2bd66239464855c345b9f599f12.zip |
Fix crashing on TargetCustom PseudoSourceValues
Default to something more reasonable if printCustom isn't implemented.
llvm-svn: 298941
Diffstat (limited to 'llvm/lib/CodeGen/PseudoSourceValue.cpp')
-rw-r--r-- | llvm/lib/CodeGen/PseudoSourceValue.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/PseudoSourceValue.cpp b/llvm/lib/CodeGen/PseudoSourceValue.cpp index 804a4c3dad6..b29e62bf1aa 100644 --- a/llvm/lib/CodeGen/PseudoSourceValue.cpp +++ b/llvm/lib/CodeGen/PseudoSourceValue.cpp @@ -29,7 +29,10 @@ PseudoSourceValue::PseudoSourceValue(PSVKind Kind) : Kind(Kind) {} PseudoSourceValue::~PseudoSourceValue() {} void PseudoSourceValue::printCustom(raw_ostream &O) const { - O << PSVNames[Kind]; + if (Kind < TargetCustom) + O << PSVNames[Kind]; + else + O << "TargetCustom" << Kind; } bool PseudoSourceValue::isConstant(const MachineFrameInfo *) const { |