]> granicus.if.org Git - llvm/commitdiff
Remove obsolete function TargetRegistry::getClosestTargetForJIT()
authorAlp Toker <alp@nuanti.com>
Tue, 1 Jul 2014 10:47:13 +0000 (10:47 +0000)
committerAlp Toker <alp@nuanti.com>
Tue, 1 Jul 2014 10:47:13 +0000 (10:47 +0000)
This was kept around "for compatibility through 2.6" in 2009 and is not used or
tested.

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

include/llvm/Support/TargetRegistry.h
lib/Support/TargetRegistry.cpp

index 291fb1b95db3329250b390d2ab0c7fccf9c29bf6..5d5b86a6a2aeb634ed09881db9d19e1d96d910de 100644 (file)
@@ -565,13 +565,6 @@ namespace llvm {
                                       Triple &TheTriple,
                                       std::string &Error);
 
-    /// getClosestTargetForJIT - Pick the best target that is compatible with
-    /// the current host.  If no close target can be found, this returns null
-    /// and sets the Error string to a reason.
-    ///
-    /// Maintained for compatibility through 2.6.
-    static const Target *getClosestTargetForJIT(std::string &Error);
-
     /// @}
     /// @name Target Registration
     /// @{
index a008831eb6be0faf60b9b885ddf11c52ff9dd1b0..f6918835f74bed5833cfb1edfc3a09c9bd696069 100644 (file)
@@ -116,17 +116,6 @@ void TargetRegistry::RegisterTarget(Target &T,
   T.HasJIT = HasJIT;
 }
 
-const Target *TargetRegistry::getClosestTargetForJIT(std::string &Error) {
-  const Target *TheTarget = lookupTarget(sys::getDefaultTargetTriple(), Error);
-
-  if (TheTarget && !TheTarget->hasJIT()) {
-    Error = "No JIT compatible target available for this host";
-    return nullptr;
-  }
-
-  return TheTarget;
-}
-
 static int TargetArraySortFn(const std::pair<StringRef, const Target *> *LHS,
                              const std::pair<StringRef, const Target *> *RHS) {
   return LHS->first.compare(RHS->first);