diff options
author | Owen Anderson <resistor@mac.com> | 2012-09-11 23:47:08 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2012-09-11 23:47:08 +0000 |
commit | 83c0eefa3b4698edd007a4cb24d550fd42566063 (patch) | |
tree | f1e52784c00cd18e6ac8fd96203c2e0dad3743a0 /utils/TableGen/CodeGenInstruction.cpp | |
parent | d2c699706ceae4a118a8dcafbef73b85093e5390 (diff) |
Improve tblgen code cleanliness: create an unknown_class, from which the unknown def inherits. Make tblgen check for that class, rather than checking for the def itself.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163664 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r-- | utils/TableGen/CodeGenInstruction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/TableGen/CodeGenInstruction.cpp b/utils/TableGen/CodeGenInstruction.cpp index 38e2b832f2..836279b89a 100644 --- a/utils/TableGen/CodeGenInstruction.cpp +++ b/utils/TableGen/CodeGenInstruction.cpp @@ -101,7 +101,7 @@ CGIOperandList::CGIOperandList(Record *R) : TheDef(R) { } else if (Rec->isSubClassOf("RegisterClass")) { OperandType = "OPERAND_REGISTER"; } else if (!Rec->isSubClassOf("PointerLikeRegClass") && - Rec->getName() != "unknown") + !Rec->isSubClassOf("unknown_class")) throw "Unknown operand class '" + Rec->getName() + "' in '" + R->getName() + "' instruction!"; |