Grab the subtarget info off of the MachineFunction rather than
[oota-llvm.git] / lib / Target / ARM / ARMLoadStoreOptimizer.cpp
index 3d060eed177d5fdbfe91fd08abd0171a6d6637d8..c429ac18521109ae6eddb4f99baf11bfdde16a87 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;