[PATCH] D107970: [LLVM][Support] Add macOS 12 to Triple.cpp

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 24 13:56:50 PDT 2021


jrtc27 added inline comments.


================
Comment at: llvm/lib/Support/Triple.cpp:1143
     // Ignore the version from the triple.  This is only handled because the
-    // the clang driver combines OS X and IOS support into a common Darwin
+    // the clang driver combines OS X and iOS support into a common Darwin
     // toolchain that wants to know the OS X version number even when targeting
----------------
You're not touching these functions, leave them alone


================
Comment at: llvm/lib/Support/Triple.cpp:1767
-
-  llvm_unreachable("invalid arch name");
 }
----------------
Don't include unrelated changes


================
Comment at: llvm/lib/Support/Triple.cpp:1775
       return VersionTuple(11, 0);
+    // macOS 10.17 is canonicalized to macOS 12.
+    // TODO: Find a better way to do this going forward rather than hardcoding a
----------------
This function isn't used by LLVM, it's only used by Swift, and I don't know if they need to support 10.17 meaning 12 or whether 10.16 meaning 11 was just a one-off due to having a bunch of code already written that was using 10.16 in @available etc annotations. IMO this should be left alone until someone from Apple decides they do in fact need this; their fork of LLVM doesn't currently have this function changed, for example, though that could just be because they haven't made Monterey changes public yet (but if it's needed they'll have already discovered that long ago).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107970/new/

https://reviews.llvm.org/D107970



More information about the llvm-commits mailing list