From 0d4ad84aa2f0e7d6613e7223a77fd31a6934f9b0 Mon Sep 17 00:00:00 2001 From: Nicolai Haehnle Date: Sun, 25 Feb 2018 20:50:17 +0000 Subject: [PATCH] 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 --- llvm/include/llvm/TableGen/Record.h | 2 -- llvm/lib/TableGen/Record.cpp | 7 ------- 2 files changed, 9 deletions(-) diff --git a/llvm/include/llvm/TableGen/Record.h b/llvm/include/llvm/TableGen/Record.h index ba28cb4..ba6123b 100644 --- a/llvm/include/llvm/TableGen/Record.h +++ b/llvm/include/llvm/TableGen/Record.h @@ -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 diff --git a/llvm/lib/TableGen/Record.cpp b/llvm/lib/TableGen/Record.cpp index 4686841..d487970 100644 --- a/llvm/lib/TableGen/Record.cpp +++ b/llvm/lib/TableGen/Record.cpp @@ -1248,13 +1248,6 @@ Init *VarInit::getBit(unsigned Bit) const { return VarBitInit::get(const_cast(this), Bit); } -RecTy *VarInit::getFieldType(StringInit *FieldName) const { - if (RecordRecTy *RTy = dyn_cast(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(Val->getValue()))) -- 2.7.4