[PATCH] D43678: TableGen: Remove VarInit::getFieldType
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 23 07:48:06 PST 2018
nhaehnle created this revision.
nhaehnle added reviewers: arsenm, craig.topper, tra, MartinO.
Herald added a subscriber: wdng.
It is redundant with the implementation in TypedInit.
Change-Id: I8ab1fb5c77e4923f7eb3ffae5889f0f8af6093b4
Repository:
rL LLVM
https://reviews.llvm.org/D43678
Files:
include/llvm/TableGen/Record.h
lib/TableGen/Record.cpp
Index: lib/TableGen/Record.cpp
===================================================================
--- lib/TableGen/Record.cpp
+++ lib/TableGen/Record.cpp
@@ -1248,13 +1248,6 @@
return VarBitInit::get(const_cast<VarInit*>(this), Bit);
}
-RecTy *VarInit::getFieldType(StringInit *FieldName) const {
- if (RecordRecTy *RTy = dyn_cast<RecordRecTy>(getType()))
- if (const RecordVal *RV = RTy->getRecord()->getValue(FieldName))
- return RV->getType();
- return nullptr;
-}
-
Init *VarInit::resolveReferences(Record &R, const RecordVal *RV) const {
if (RecordVal *Val = R.getValue(VarName))
if (RV == Val || (!RV && !isa<UnsetInit>(Val->getValue())))
Index: include/llvm/TableGen/Record.h
===================================================================
--- include/llvm/TableGen/Record.h
+++ include/llvm/TableGen/Record.h
@@ -892,8 +892,6 @@
return getNameInit()->getAsUnquotedString();
}
- RecTy *getFieldType(StringInit *FieldName) const override;
-
/// This method is used by classes that refer to other
/// variables which may not be defined at the time they expression is formed.
/// If a value is set for the variable later, this method will be called on
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43678.135641.patch
Type: text/x-patch
Size: 1206 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180223/dac64484/attachment.bin>
More information about the llvm-commits
mailing list