From 25b7acf34fc7812e671799a73c90e738f6c5386b Mon Sep 17 00:00:00 2001 From: Alp Toker Date: Tue, 1 Jul 2014 10:47:13 +0000 Subject: [PATCH] Remove obsolete function TargetRegistry::getClosestTargetForJIT() 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 | 7 ------- lib/Support/TargetRegistry.cpp | 11 ----------- 2 files changed, 18 deletions(-) diff --git a/include/llvm/Support/TargetRegistry.h b/include/llvm/Support/TargetRegistry.h index 291fb1b95db..5d5b86a6a2a 100644 --- a/include/llvm/Support/TargetRegistry.h +++ b/include/llvm/Support/TargetRegistry.h @@ -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 /// @{ diff --git a/lib/Support/TargetRegistry.cpp b/lib/Support/TargetRegistry.cpp index a008831eb6b..f6918835f74 100644 --- a/lib/Support/TargetRegistry.cpp +++ b/lib/Support/TargetRegistry.cpp @@ -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 *LHS, const std::pair *RHS) { return LHS->first.compare(RHS->first);