diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h
index b19d57c71667e724410146c80b745effa7194569..bdae270aa846a8d0f0df8c59fbb77f7ad17b1104 100644
--- a/include/clang/Basic/TargetInfo.h
+++ b/include/clang/Basic/TargetInfo.h
@@ -746,15 +746,7 @@ public:
   /// \return False on error (invalid features).
   virtual bool initFeatureMap(llvm::StringMap<bool> &Features,
                               DiagnosticsEngine &Diags, StringRef CPU,
-                              std::vector<std::string> &FeatureVec) const {
-    for (const auto &F : FeatureVec) {
-      const char *Name = F.c_str();
-      // Apply the feature via the target.
-      bool Enabled = Name[0] == '+';
-      setFeatureEnabled(Features, Name + 1, Enabled);
-    }
-    return true;
-  }
+                              std::vector<std::string> &FeatureVec) const;
 
   /// \brief Get the ABI currently in use.
   virtual StringRef getABI() const { return StringRef(); }
diff --git a/lib/Basic/TargetInfo.cpp b/lib/Basic/TargetInfo.cpp
index 30378a5a751ee35bf7ee1601b2c44a7d24bb7dc0..aa7385eb005da543bde5720da9c6779ef20de898 100644
--- a/lib/Basic/TargetInfo.cpp
+++ b/lib/Basic/TargetInfo.cpp
@@ -311,6 +311,18 @@ void TargetInfo::adjust(const LangOptions &Opts) {
   }
 }
 
+bool TargetInfo::initFeatureMap(llvm::StringMap<bool> &Features,
+                                DiagnosticsEngine &Diags, StringRef CPU,
+                                std::vector<std::string> &FeatureVec) const {
+  for (const auto &F : FeatureVec) {
+    const char *Name = F.c_str();
+    // Apply the feature via the target.
+    bool Enabled = Name[0] == '+';
+    setFeatureEnabled(Features, Name + 1, Enabled);
+  }
+  return true;
+}
+
 //===----------------------------------------------------------------------===//