diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-28 06:04:39 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-28 06:04:39 +0000 |
commit | c812261221040ac991f0c9710036a079f208281e (patch) | |
tree | 2256eebaf68874c4a3e1c68050b00794e3caa184 /utils/TableGen/CodeGenDAGPatterns.cpp | |
parent | 0b5d4908dd2ccb422e44df1b44e7910dc767df87 (diff) |
SDTCisVT<0, isVoid> is not valid, reject it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99744 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 94e3c24b25..0f17f924a3 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -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")) { |