Improve JIT error message for users crazy enough to use -march with JIT, and

mention -version in messages about missing targets.

llvm-svn: 81272
This commit is contained in:
Daniel Dunbar 2009-09-08 23:32:35 +00:00
parent 22833a3cd6
commit 6119d878bb
2 changed files with 6 additions and 3 deletions

View File

@ -26,7 +26,8 @@
using namespace llvm;
static cl::opt<std::string>
MArch("march", cl::desc("Architecture to generate assembly for (see --version)"));
MArch("march",
cl::desc("Architecture to generate assembly for (see --version)"));
static cl::opt<std::string>
MCPU("mcpu",
@ -61,7 +62,8 @@ TargetMachine *JIT::selectTarget(ModuleProvider *MP, std::string *ErrorStr) {
}
if (!TheTarget) {
errs() << "JIT: error: invalid target '" << MArch << "'.\n";
*ErrorStr = "No available targets are compatible with this -march, "
"see -version for the available targets.\n";
return 0;
}

View File

@ -40,7 +40,8 @@ const Target *TargetRegistry::lookupTarget(const std::string &TT,
}
if (!Best) {
Error = "No available targets are compatible with this triple";
Error = "No available targets are compatible with this triple, "
"see -version for the available targets.";
return 0;
}