OSDN Git Service

Use the template method to grab the target specific subtarget.
authorEric Christopher <echristo@gmail.com>
Sat, 14 Feb 2015 00:09:46 +0000 (00:09 +0000)
committerEric Christopher <echristo@gmail.com>
Sat, 14 Feb 2015 00:09:46 +0000 (00:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229191 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/Mips/MipsFastISel.cpp

index 112e566..34d46f9 100644 (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();