ADT/Triple: Add support for more explicit "osx" and "ios" OS names.
authorDaniel Dunbar <daniel@zuster.org>
Tue, 19 Apr 2011 20:19:27 +0000 (20:19 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Tue, 19 Apr 2011 20:19:27 +0000 (20:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129798 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Triple.h
lib/Support/Triple.cpp

index ff9dd1972a483adaa28b81ad2281008b52322bae..414b0ce48dc52e994dbc71f1046b5c6be97fb380 100644 (file)
@@ -83,10 +83,12 @@ public:
     Darwin,
     DragonFly,
     FreeBSD,
+    IOS,
     Linux,
     Lv2,        // PS3
     MinGW32,    // i*86-pc-mingw32, *-w64-mingw32
     NetBSD,
+    OSX,
     OpenBSD,
     Psp,
     Solaris,
index 53ca48f8464db406d90b14cc278613607b368279..2679481b4768267210432248610bf78c7b54f843 100644 (file)
@@ -99,10 +99,12 @@ const char *Triple::getOSTypeName(OSType Kind) {
   case Darwin: return "darwin";
   case DragonFly: return "dragonfly";
   case FreeBSD: return "freebsd";
+  case IOS: return "ios";
   case Linux: return "linux";
   case Lv2: return "lv2";
   case MinGW32: return "mingw32";
   case NetBSD: return "netbsd";
+  case OSX: return "osx";
   case OpenBSD: return "openbsd";
   case Psp: return "psp";
   case Solaris: return "solaris";
@@ -314,6 +316,8 @@ Triple::OSType Triple::ParseOS(StringRef OSName) {
     return DragonFly;
   else if (OSName.startswith("freebsd"))
     return FreeBSD;
+  else if (OSName.startswith("ios"))
+    return IOS;
   else if (OSName.startswith("linux"))
     return Linux;
   else if (OSName.startswith("lv2"))
@@ -322,6 +326,8 @@ Triple::OSType Triple::ParseOS(StringRef OSName) {
     return MinGW32;
   else if (OSName.startswith("netbsd"))
     return NetBSD;
+  else if (OSName.startswith("osx"))
+    return OSX;
   else if (OSName.startswith("openbsd"))
     return OpenBSD;
   else if (OSName.startswith("psp"))