// 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";
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);