summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenInstruction.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2012-09-11 23:47:08 +0000
committerOwen Anderson <resistor@mac.com>2012-09-11 23:47:08 +0000
commit83c0eefa3b4698edd007a4cb24d550fd42566063 (patch)
treef1e52784c00cd18e6ac8fd96203c2e0dad3743a0 /utils/TableGen/CodeGenInstruction.cpp
parentd2c699706ceae4a118a8dcafbef73b85093e5390 (diff)
downloadllvm-83c0eefa3b4698edd007a4cb24d550fd42566063.tar.gz
llvm-83c0eefa3b4698edd007a4cb24d550fd42566063.tar.bz2
llvm-83c0eefa3b4698edd007a4cb24d550fd42566063.tar.xz
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.cpp2
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!";