forked from OSchip/llvm-project
SDTCisVT<0, isVoid> is not valid, reject it.
llvm-svn: 99744
This commit is contained in:
parent
cba70c8162
commit
ffdac7b76a
|
@ -524,6 +524,9 @@ SDTypeConstraint::SDTypeConstraint(Record *R) {
|
||||||
if (R->isSubClassOf("SDTCisVT")) {
|
if (R->isSubClassOf("SDTCisVT")) {
|
||||||
ConstraintType = SDTCisVT;
|
ConstraintType = SDTCisVT;
|
||||||
x.SDTCisVT_Info.VT = getValueType(R->getValueAsDef("VT"));
|
x.SDTCisVT_Info.VT = getValueType(R->getValueAsDef("VT"));
|
||||||
|
if (x.SDTCisVT_Info.VT == MVT::isVoid)
|
||||||
|
throw TGError(R->getLoc(), "Cannot use 'Void' as type to SDTCisVT");
|
||||||
|
|
||||||
} else if (R->isSubClassOf("SDTCisPtrTy")) {
|
} else if (R->isSubClassOf("SDTCisPtrTy")) {
|
||||||
ConstraintType = SDTCisPtrTy;
|
ConstraintType = SDTCisPtrTy;
|
||||||
} else if (R->isSubClassOf("SDTCisInt")) {
|
} else if (R->isSubClassOf("SDTCisInt")) {
|
||||||
|
|
Loading…
Reference in New Issue