Use the function template getSubtarget to remove an explicit cast.
[oota-llvm.git] / lib / Target / Hexagon / HexagonCopyToCombine.cpp
index 1883ad8f2e51499ec3fb6234b7fabfe46c561aa1..e850804055b172d36aaeffc9b8407491b791821d 100644 (file)
@@ -418,7 +418,7 @@ bool HexagonCopyToCombine::runOnMachineFunction(MachineFunction &MF) {
 
   // Get target info.
   TRI = MF.getSubtarget().getRegisterInfo();
-  TII = static_cast<const HexagonInstrInfo *>(MF.getSubtarget().getInstrInfo());
+  TII = MF.getSubtarget<HexagonSubtarget>().getInstrInfo();
 
   // Combine aggressively (for code size)
   ShouldCombineAggressively =