summaryrefslogtreecommitdiff
path: root/utils/TableGen/Record.h
diff options
context:
space:
mode:
Diffstat (limited to 'utils/TableGen/Record.h')
-rw-r--r--utils/TableGen/Record.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h
index b621451643..5c50a07651 100644
--- a/utils/TableGen/Record.h
+++ b/utils/TableGen/Record.h
@@ -703,6 +703,13 @@ public:
return false;
}
+ bool isSubClassOf(const std::string &Name) const {
+ for (unsigned i = 0, e = SuperClasses.size(); i != e; ++i)
+ if (SuperClasses[i]->getName() == Name)
+ return true;
+ return false;
+ }
+
void addSuperClass(Record *R) {
assert(!isSubClassOf(R) && "Already subclassing record!");
SuperClasses.push_back(R);