mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-04 09:37:20 +00:00
TargetLowering: Don't index into empty string.
(This is triggered by current lit tests) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192549 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6dd7893e8c
commit
833a29c296
@ -2012,7 +2012,7 @@ void TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
|
|||||||
std::pair<unsigned, const TargetRegisterClass*> TargetLowering::
|
std::pair<unsigned, const TargetRegisterClass*> TargetLowering::
|
||||||
getRegForInlineAsmConstraint(const std::string &Constraint,
|
getRegForInlineAsmConstraint(const std::string &Constraint,
|
||||||
MVT VT) const {
|
MVT VT) const {
|
||||||
if (Constraint[0] != '{')
|
if (Constraint.empty() || Constraint[0] != '{')
|
||||||
return std::make_pair(0u, static_cast<TargetRegisterClass*>(0));
|
return std::make_pair(0u, static_cast<TargetRegisterClass*>(0));
|
||||||
assert(*(Constraint.end()-1) == '}' && "Not a brace enclosed constraint?");
|
assert(*(Constraint.end()-1) == '}' && "Not a brace enclosed constraint?");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user