[PATCH] D16028: If we don't recognise the target, explicitly specify the executable that can list targets.
Wilfred Hughes via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 9 10:45:42 PST 2016
Wilfred created this revision.
Wilfred added a subscriber: llvm-commits.
Wilfred set the repository for this revision to rL LLVM.
`LLVMGetTargetFromTriple` is part of the C API, but ultimately calls `TargetRegistry::lookupTarget`.
However, the error string from this function seems to assume that it's being used inside `llc`. As a result, callers of `LLVMGetTargetFromTriple` are forced to ignore the error string. This is unfortunate because the other values, e.g. "no targets are registered" is useful feedback.
I'm open to suggestions as to the best wording here.
Repository:
rL LLVM
http://reviews.llvm.org/D16028
Files:
lib/Support/TargetRegistry.cpp
Index: lib/Support/TargetRegistry.cpp
===================================================================
--- lib/Support/TargetRegistry.cpp
+++ lib/Support/TargetRegistry.cpp
@@ -74,7 +74,7 @@
if (I == targets().end()) {
Error = "No available targets are compatible with this triple, "
- "see -version for the available targets.";
+ "see llc -version for the available targets.";
return nullptr;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D16028.44406.patch
Type: text/x-patch
Size: 435 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160109/88684df1/attachment.bin>
More information about the llvm-commits
mailing list