mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +00:00
Improve JIT error message for users crazy enough to use -march with JIT, and
mention -version in messages about missing targets. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
1 parent
d50c2b9064
commit
0247656d0a
2 files changed
+6
-3
No files matched your search
@@ -26,7 +26,8 @@
|
|||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
static cl::opt<std::string>
|
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>
|
static cl::opt<std::string>
|
||||||
MCPU("mcpu",
|
MCPU("mcpu",
|
||||||
@@ -61,7 +62,8 @@ TargetMachine *JIT::selectTarget(ModuleProvider *MP, std::string *ErrorStr) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!TheTarget) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,8 @@ const Target *TargetRegistry::lookupTarget(const std::string &TT,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!Best) {
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user