[llvm] Make clang report garbage target versions. (PR #75373)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 13 12:14:56 PST 2023
================
@@ -1199,7 +1200,11 @@ StringRef Triple::getOSAndEnvironmentName() const {
static VersionTuple parseVersionFromName(StringRef Name) {
VersionTuple Version;
- Version.tryParse(Name);
+ if (Version.tryParse(Name)) {
+ errs() << "The input is "<< Name << " and it is invalid. Should pass an "<<
+ "integer or integer combination! e.g. 2, 9.5 or 3.4.5\n";
----------------
enh-google wrote:
maybe better to just go with `"version " << Name << " is invalid"`, rather than try to give examples, since they're so different between Android and iOS/macOS?
https://github.com/llvm/llvm-project/pull/75373
More information about the llvm-commits
mailing list