OSDN Git Service

Grab the subtarget info off of the MachineFunction rather than
authorEric Christopher <echristo@gmail.com>
Tue, 14 Oct 2014 08:44:19 +0000 (08:44 +0000)
committerEric Christopher <echristo@gmail.com>
Tue, 14 Oct 2014 08:44:19 +0000 (08:44 +0000)
indirecting through the TargetMachine.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219674 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/ARMLoadStoreOptimizer.cpp

index 3d060ee..c429ac1 100644 (file)
@@ -1853,7 +1853,7 @@ bool ARMPreAllocLoadStoreOpt::runOnMachineFunction(MachineFunction &Fn) {
   TD = Fn.getSubtarget().getDataLayout();
   TII = Fn.getSubtarget().getInstrInfo();
   TRI = Fn.getSubtarget().getRegisterInfo();
-  STI = &Fn.getTarget().getSubtarget<ARMSubtarget>();
+  STI = &static_cast<const ARMSubtarget &>(Fn.getSubtarget());
   MRI = &Fn.getRegInfo();
   MF  = &Fn;