SDTCisVT<0, isVoid> is not valid, reject it.
authorChris Lattner <sabre@nondot.org>
Sun, 28 Mar 2010 06:04:39 +0000 (06:04 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 28 Mar 2010 06:04:39 +0000 (06:04 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99744 91177308-0d34-0410-b5e6-96231b3b80d8

utils/TableGen/CodeGenDAGPatterns.cpp

index 94e3c24b254ceb89973ca198917f05e6d6a686db..0f17f924a360fcde8408ededfed392254f0bc13f 100644 (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")) {