summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit16ba4b2d83a0fe2451910d1caa2b94ea27dba565 (patch)
tree73e659967061ec94e3a1fde25f3e37aba22c7b92 /llvm/utils/TableGen/CodeGenInstruction.cpp
parentccd682c69543bfdb0db692daf54cdd2cb14aa487 (diff)
downloadbcm5719-llvm-16ba4b2d83a0fe2451910d1caa2b94ea27dba565.tar.gz
bcm5719-llvm-16ba4b2d83a0fe2451910d1caa2b94ea27dba565.zip
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.
llvm-svn: 163664
Diffstat (limited to 'llvm/utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenInstruction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp
index 38e2b832f2f..836279b89ab 100644
--- a/llvm/utils/TableGen/CodeGenInstruction.cpp
+++ b/llvm/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!";
OpenPOWER on IntegriCloud