diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp index 3d060eed177d..c429ac185211 100644 --- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp +++ b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp @@ -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(); + STI = &static_cast(Fn.getSubtarget()); MRI = &Fn.getRegInfo(); MF = &Fn;