Skip to content

Commit

Permalink
Remove obsolete function TargetRegistry::getClosestTargetForJIT()
Browse files Browse the repository at this point in the history
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
  • Loading branch information
atoker committed Jul 1, 2014
1 parent 74ed21f commit 25b7acf
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
7 changes: 0 additions & 7 deletions include/llvm/Support/TargetRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
/// @{
Expand Down
11 changes: 0 additions & 11 deletions lib/Support/TargetRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 25b7acf

Please sign in to comment.