Use the function template getSubtarget to remove an explicit cast.
authorEric Christopher <echristo@gmail.com>
Mon, 2 Feb 2015 18:46:29 +0000 (18:46 +0000)
committerEric Christopher <echristo@gmail.com>
Mon, 2 Feb 2015 18:46:29 +0000 (18:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227831 91177308-0d34-0410-b5e6-96231b3b80d8

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 =