aboutsummaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenDAGPatterns.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-28 08:48:47 +0000
committerChris Lattner <sabre@nondot.org>2010-03-28 08:48:47 +0000
commit2a22cdc716ea652d6c9ebdaae028b5c75ab2793a (patch)
treeb69956d83e0a3e116f2c096ff5397b8fff48d8f4 /utils/TableGen/CodeGenDAGPatterns.h
parent263bd9abe283caf7461cf77c494d441679351be1 (diff)
improve type checking of SDNode operand count. This rejects all cases
where an incorrect number of operands is provided to an sdnode instead of just a few cases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99761 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h
index 29c6c5615c..0960647300 100644
--- a/utils/TableGen/CodeGenDAGPatterns.h
+++ b/utils/TableGen/CodeGenDAGPatterns.h
@@ -199,6 +199,9 @@ public:
SDNodeInfo(Record *R); // Parse the specified record.
unsigned getNumResults() const { return NumResults; }
+
+ /// getNumOperands - This is the number of operands required or -1 if
+ /// variadic.
int getNumOperands() const { return NumOperands; }
Record *getRecord() const { return Def; }
const std::string &getEnumName() const { return EnumName; }