Fix crashing on TargetCustom PseudoSourceValues

Default to something more reasonable if printCustom isn't implemented.

llvm-svn: 298941
This commit is contained in:
Matt Arsenault 2017-03-28 20:33:12 +00:00
parent a9ea65ebd8
commit a3fa896b52

View File

@ -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 {