Forward the Function based getSubtarget call to the appropriate Impl
authorEric Christopher <echristo@gmail.com>
Sat, 21 Mar 2015 03:32:45 +0000 (03:32 +0000)
committerEric Christopher <echristo@gmail.com>
Sat, 21 Mar 2015 03:32:45 +0000 (03:32 +0000)
call.

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

include/llvm/Target/TargetMachine.h

index cd43532fb65abcf46e52fae634f9729d0f48abac..1ffaeb0c14371875f522bf3e299516adeb74a233 100644 (file)
@@ -124,8 +124,8 @@ public:
   template<typename STC> const STC &getSubtarget() const {
     return *static_cast<const STC*>(getSubtargetImpl());
   }
-  template <typename STC> const STC &getSubtarget(const Function &) const {
-    return *static_cast<const STC*>(getSubtargetImpl());
+  template <typename STC> const STC &getSubtarget(const Function &F) const {
+    return *static_cast<const STC*>(getSubtargetImpl(F));
   }
 
   /// getDataLayout - This method returns a pointer to the DataLayout for