forked from OSchip/llvm-project
TargetLowering: Don't index into empty string.
(This is triggered by current lit tests) llvm-svn: 192549
This commit is contained in:
parent
9f21325ac7
commit
ae726a93e3
|
@ -2012,7 +2012,7 @@ void TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
|
|||
std::pair<unsigned, const TargetRegisterClass*> TargetLowering::
|
||||
getRegForInlineAsmConstraint(const std::string &Constraint,
|
||||
MVT VT) const {
|
||||
if (Constraint[0] != '{')
|
||||
if (Constraint.empty() || Constraint[0] != '{')
|
||||
return std::make_pair(0u, static_cast<TargetRegisterClass*>(0));
|
||||
assert(*(Constraint.end()-1) == '}' && "Not a brace enclosed constraint?");
|
||||
|
||||
|
|
Loading…
Reference in New Issue