[PATCH] D32748: [Triple] Add a "macos" OS type that acts as a synonym for "macosx"
Alex Lorenz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 3 03:55:42 PDT 2017
This revision was automatically updated to reflect the committed changes.
arphaman marked an inline comment as done.
Closed by commit rL302011: [Triple] Add a "macos" OS type that acts as a synonym for "macosx" (authored by arphaman).
Changed prior to commit:
https://reviews.llvm.org/D32748?vs=97444&id=97589#toc
Repository:
rL LLVM
https://reviews.llvm.org/D32748
Files:
llvm/trunk/lib/Support/Triple.cpp
llvm/trunk/test/CodeGen/X86/version_directive.ll
Index: llvm/trunk/test/CodeGen/X86/version_directive.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/version_directive.ll
+++ llvm/trunk/test/CodeGen/X86/version_directive.ll
@@ -1,4 +1,5 @@
; RUN: llc -mtriple x86_64-apple-darwin15.0.0 -o - /dev/null | FileCheck %s
; RUN: llc -mtriple x86_64-apple-macosx10.11.0 -o - /dev/null | FileCheck %s
+; RUN: llc -mtriple x86_64-apple-macos10.11.0 -o - /dev/null | FileCheck %s
; CHECK: .macosx_version_min 10, 11
Index: llvm/trunk/lib/Support/Triple.cpp
===================================================================
--- llvm/trunk/lib/Support/Triple.cpp
+++ llvm/trunk/lib/Support/Triple.cpp
@@ -459,7 +459,7 @@
.StartsWith("kfreebsd", Triple::KFreeBSD)
.StartsWith("linux", Triple::Linux)
.StartsWith("lv2", Triple::Lv2)
- .StartsWith("macosx", Triple::MacOSX)
+ .StartsWith("macos", Triple::MacOSX)
.StartsWith("netbsd", Triple::NetBSD)
.StartsWith("openbsd", Triple::OpenBSD)
.StartsWith("solaris", Triple::Solaris)
@@ -984,6 +984,8 @@
StringRef OSTypeName = getOSTypeName(getOS());
if (OSName.startswith(OSTypeName))
OSName = OSName.substr(OSTypeName.size());
+ else if (getOS() == MacOSX)
+ OSName.consume_front("macos");
parseVersionFromName(OSName, Major, Minor, Micro);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32748.97589.patch
Type: text/x-patch
Size: 1347 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170503/7e4ada0e/attachment.bin>
More information about the llvm-commits
mailing list