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
diff --git a/lib/ExecutionEngine/JIT/TargetSelect.cpp b/lib/ExecutionEngine/JIT/TargetSelect.cpp
index 2c10541..8bed33b 100644
--- a/lib/ExecutionEngine/JIT/TargetSelect.cpp
+++ b/lib/ExecutionEngine/JIT/TargetSelect.cpp
@@ -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 @@
}
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;
}