[PATCH] D32748: [Triple] Add a "macos" OS type that acts as a synonym for "macosx"

David Majnemer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 2 18:16:35 PDT 2017


majnemer added inline comments.


================
Comment at: lib/Support/Triple.cpp:987-988
     OSName = OSName.substr(OSTypeName.size());
+  else if (getOS() == MacOSX && OSName.startswith("macos"))
+    OSName = OSName.substr(strlen("macos"));
 
----------------
You could simplify this:
  else if (getOS() == MacOSX)
    OSName.consume_front("macos");


Repository:
  rL LLVM

https://reviews.llvm.org/D32748





More information about the llvm-commits mailing list