From 135091bd9dd749b6bf731697b2371b77be5bdf5f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 28 Mar 2010 08:48:47 +0000 Subject: 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. llvm-svn: 99761 --- llvm/utils/TableGen/CodeGenDAGPatterns.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'llvm/utils/TableGen/CodeGenDAGPatterns.h') diff --git a/llvm/utils/TableGen/CodeGenDAGPatterns.h b/llvm/utils/TableGen/CodeGenDAGPatterns.h index 29c6c5615c9..0960647300f 100644 --- a/llvm/utils/TableGen/CodeGenDAGPatterns.h +++ b/llvm/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; } -- cgit v1.2.3