[Lldb-commits] [PATCH] D88181: Utility: ignore OS version on non-Darwin targets in `ArchSpec`

Saleem Abdulrasool via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 23 14:01:44 PDT 2020

compnerd created this revision.
compnerd added reviewers: JDevlieghere, kastiglione.
compnerd added a project: LLDB.
compnerd requested review of this revision.

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

  rG LLVM Github Monorepo



Index: lldb/source/Utility/ArchSpec.cpp
--- lldb/source/Utility/ArchSpec.cpp
+++ lldb/source/Utility/ArchSpec.cpp
@@ -1426,7 +1426,8 @@
     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;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88181.293857.patch
Type: text/x-patch
Size: 614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200923/8cffa57a/attachment.bin>

More information about the lldb-commits mailing list