Use the template method to grab the target specific subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2015-02-14 00:09:46 +00:00
parent d777c2c0c0
commit c21d153388

View File

@ -158,8 +158,7 @@ public:
explicit MipsFastISel(FunctionLoweringInfo &funcInfo,
const TargetLibraryInfo *libInfo)
: FastISel(funcInfo, libInfo), TM(funcInfo.MF->getTarget()),
Subtarget(
&static_cast<const MipsSubtarget &>(funcInfo.MF->getSubtarget())),
Subtarget(&funcInfo.MF->getSubtarget<MipsSubtarget>()),
TII(*Subtarget->getInstrInfo()), TLI(*Subtarget->getTargetLowering()) {
MFI = funcInfo.MF->getInfo<MipsFunctionInfo>();
Context = &funcInfo.Fn->getContext();