diff options
Diffstat (limited to 'include/llvm/TableGen')
-rw-r--r-- | include/llvm/TableGen/Record.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/include/llvm/TableGen/Record.h b/include/llvm/TableGen/Record.h index 22e761f44a..4502aa72a7 100644 --- a/include/llvm/TableGen/Record.h +++ b/include/llvm/TableGen/Record.h @@ -1442,6 +1442,9 @@ public: return 0; } + const RecordVal *getValue(Init *Name) const; + RecordVal *getValue(Init *Name); + void addTemplateArg(StringRef Name) { assert(!isTemplateArg(Name) && "Template arg already defined!"); TemplateArgs.push_back(Name); @@ -1452,15 +1455,19 @@ public: Values.push_back(RV); } - void removeValue(StringRef Name) { + void removeValue(Init *Name) { for (unsigned i = 0, e = Values.size(); i != e; ++i) - if (Values[i].getName() == Name) { + if (Values[i].getNameInit() == Name) { Values.erase(Values.begin()+i); return; } assert(0 && "Cannot remove an entry that does not exist!"); } + void removeValue(StringRef Name) { + removeValue(StringInit::get(Name.str())); + } + bool isSubClassOf(const Record *R) const { for (unsigned i = 0, e = SuperClasses.size(); i != e; ++i) if (SuperClasses[i] == R) |