TableGen: Remove VarInit::getFieldType

It is redundant with the implementation in TypedInit.

Change-Id: I8ab1fb5c77e4923f7eb3ffae5889f0f8af6093b4

Reviewers: arsenm, craig.topper, tra, MartinO

Subscribers: wdng, llvm-commits

Differential Revision: https://reviews.llvm.org/D43678

llvm-svn: 326061
This commit is contained in:
Nicolai Haehnle 2018-02-25 20:50:17 +00:00
parent f869522e84
commit 87103c8a07
2 changed files with 0 additions and 9 deletions

View File

@ -892,8 +892,6 @@ public:
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

View File

@ -1248,13 +1248,6 @@ Init *VarInit::getBit(unsigned Bit) const {
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())))