X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FSupport%2FTargetRegistry.cpp;h=f6918835f74bed5833cfb1edfc3a09c9bd696069;hb=9c23685dd25370a9a255052e44fa609b8ce455c0;hp=5b0e4a30a9b3c7c930b8022ea36b926264d9d28f;hpb=34bc6b6e787f27b5c9e05c82de4c1b4ac9b117bc;p=oota-llvm.git diff --git a/lib/Support/TargetRegistry.cpp b/lib/Support/TargetRegistry.cpp index 5b0e4a30a9b..f6918835f74 100644 --- a/lib/Support/TargetRegistry.cpp +++ b/lib/Support/TargetRegistry.cpp @@ -53,7 +53,7 @@ const Target *TargetRegistry::lookupTarget(const std::string &ArchName, // Get the target specific parser. std::string TempError; TheTarget = TargetRegistry::lookupTarget(TheTriple.getTriple(), TempError); - if (TheTarget == nullptr) { + if (!TheTarget) { Error = ": error: unable to get target for '" + TheTriple.getTriple() + "', see --version and --triple.\n"; @@ -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);