ADT/Triple: Add support for more explicit "osx" and "ios" OS names.

llvm-svn: 129798
This commit is contained in:
Daniel Dunbar 2011-04-19 20:19:27 +00:00
parent c1c92a2ab3
commit d74bac70c4
2 changed files with 8 additions and 0 deletions

View 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,

View 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"))