mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 16:56:50 +00:00
[TableGen] Implement non-const versions of Record::getValue by delegating to the const versions to avoid duplicate code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304281 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fa336f863c
commit
24c1e7771a
@ -1379,13 +1379,11 @@ public:
|
||||
}
|
||||
|
||||
RecordVal *getValue(const Init *Name) {
|
||||
for (RecordVal &Val : Values)
|
||||
if (Val.Name == Name) return &Val;
|
||||
return nullptr;
|
||||
return const_cast<RecordVal *>(static_cast<const Record *>(this)->getValue(Name));
|
||||
}
|
||||
|
||||
RecordVal *getValue(StringRef Name) {
|
||||
return getValue(StringInit::get(Name));
|
||||
return const_cast<RecordVal *>(static_cast<const Record *>(this)->getValue(Name));
|
||||
}
|
||||
|
||||
void addTemplateArg(Init *Name) {
|
||||
|
Loading…
Reference in New Issue
Block a user