1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00

SDTCisVT<0, isVoid> is not valid, reject it.

llvm-svn: 99744
This commit is contained in:
Chris Lattner 2010-03-28 06:04:39 +00:00
parent 941ab0b2d5
commit 7c35e259aa

View File

@ -524,6 +524,9 @@ SDTypeConstraint::SDTypeConstraint(Record *R) {
if (R->isSubClassOf("SDTCisVT")) {
ConstraintType = SDTCisVT;
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")) {
ConstraintType = SDTCisPtrTy;
} else if (R->isSubClassOf("SDTCisInt")) {