summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-28 06:04:39 +0000
committerChris Lattner <sabre@nondot.org>2010-03-28 06:04:39 +0000
commitffdac7b76a350efac7aa8961437c673efa52b236 (patch)
treefdf71c7a3d60c91d13a115ade80d4a0339cae680 /llvm/utils/TableGen/CodeGenDAGPatterns.cpp
parentcba70c8162010276a883b265c3cb31600d5a01ab (diff)
downloadbcm5719-llvm-ffdac7b76a350efac7aa8961437c673efa52b236.tar.gz
bcm5719-llvm-ffdac7b76a350efac7aa8961437c673efa52b236.zip
SDTCisVT<0, isVoid> is not valid, reject it.
llvm-svn: 99744
Diffstat (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenDAGPatterns.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp b/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
index 94e3c24b254..0f17f924a36 100644
--- a/llvm/utils/TableGen/CodeGenDAGPatterns.cpp
+++ b/llvm/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")) {
OpenPOWER on IntegriCloud