diff options
author | Dan Gohman <gohman@apple.com> | 2008-05-29 19:57:41 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-05-29 19:57:41 +0000 |
commit | 6e582c449f75645547143ca5aafacbd691834ccd (patch) | |
tree | 1f98cdec3f27e8e729a3f3bc1526b06da46a1a0c /llvm/utils/TableGen/CodeGenInstruction.cpp | |
parent | 86ff8536f9a88f7576c1a8bc117fcbc55f315f53 (diff) | |
download | bcm5719-llvm-6e582c449f75645547143ca5aafacbd691834ccd.tar.gz bcm5719-llvm-6e582c449f75645547143ca5aafacbd691834ccd.zip |
Fix a tblgen problem handling variable_ops in tblgen instruction
definitions. This adds a new construct, "discard", for indicating
that a named node in the input matching pattern is to be discarded,
instead of corresponding to a node in the output pattern. This
allows tblgen to know where the arguments for the varaible_ops are
supposed to begin.
This fixes "rdar://5791600", whatever that is ;-).
llvm-svn: 51699
Diffstat (limited to 'llvm/utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r-- | llvm/utils/TableGen/CodeGenInstruction.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp index 37c2069ec72..d52037823f6 100644 --- a/llvm/utils/TableGen/CodeGenInstruction.cpp +++ b/llvm/utils/TableGen/CodeGenInstruction.cpp @@ -163,7 +163,8 @@ CodeGenInstruction::CodeGenInstruction(Record *R, const std::string &AsmStr) isVariadic = true; continue; } else if (!Rec->isSubClassOf("RegisterClass") && - Rec->getName() != "ptr_rc" && Rec->getName() != "unknown") + Rec->getName() != "ptr_rc" && Rec->getName() != "unknown" && + Rec->getName() != "discard") throw "Unknown operand class '" + Rec->getName() + "' in instruction '" + R->getName() + "' instruction!"; |