Skip to content

Commit

Permalink
Utility: ignore OS version on non-Darwin targets in ArchSpec
Browse files Browse the repository at this point in the history
The OS version field is generally not very helpful for non-Darwin
targets.  On Linux, it identifies the kernel version which moves
out-of-sync with the userspace.  On Windows, this field actually ends up
corresponding to the Visual Studio toolset version instead of the OS
version.  Consider non-Darwin targets without an OS version to be fully
specified.

Differential Revision: https://reviews.llvm.org/D88181
Reviewed By: Jonas Devlieghere, Dave Lee
  • Loading branch information
compnerd committed Sep 24, 2020
1 parent ee7ee71 commit 92d42b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lldb/source/Utility/ArchSpec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1426,7 +1426,8 @@ bool ArchSpec::IsFullySpecifiedTriple() const {
if ((user_specified_triple.getVendor() != llvm::Triple::UnknownVendor) ||
TripleVendorWasSpecified()) {
const unsigned unspecified = 0;
if (user_specified_triple.getOSMajorVersion() != unspecified) {
if (!user_specified_triple.isOSDarwin() ||
user_specified_triple.getOSMajorVersion() != unspecified) {
user_triple_fully_specified = true;
}
}
Expand Down

0 comments on commit 92d42b3

Please sign in to comment.