[llvm] r212095 - Remove obsolete function TargetRegistry::getClosestTargetForJIT()

Alp Toker alp at nuanti.com
Tue Jul 1 03:47:15 PDT 2014


Author: alp
Date: Tue Jul  1 05:47:13 2014
New Revision: 212095

URL: http://llvm.org/viewvc/llvm-project?rev=212095&view=rev
Log:
Remove obsolete function TargetRegistry::getClosestTargetForJIT()

This was kept around "for compatibility through 2.6" in 2009 and is not used or
tested.

Modified:
    llvm/trunk/include/llvm/Support/TargetRegistry.h
    llvm/trunk/lib/Support/TargetRegistry.cpp

Modified: llvm/trunk/include/llvm/Support/TargetRegistry.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/TargetRegistry.h?rev=212095&r1=212094&r2=212095&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/TargetRegistry.h (original)
+++ llvm/trunk/include/llvm/Support/TargetRegistry.h Tue Jul  1 05:47:13 2014
@@ -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
     /// @{

Modified: llvm/trunk/lib/Support/TargetRegistry.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/TargetRegistry.cpp?rev=212095&r1=212094&r2=212095&view=diff
==============================================================================
--- llvm/trunk/lib/Support/TargetRegistry.cpp (original)
+++ llvm/trunk/lib/Support/TargetRegistry.cpp Tue Jul  1 05:47:13 2014
@@ -116,17 +116,6 @@ void TargetRegistry::RegisterTarget(Targ
   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);





More information about the llvm-commits mailing list