mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
ADT/Triple: Add support for Triple::MacOSX per feedback from Chris, will remove
Triple::OSX once Clang has moved. llvm-svn: 129833
This commit is contained in:
parent
1c0a0fde5c
commit
6af8a09825
@ -86,6 +86,7 @@ public:
|
|||||||
IOS,
|
IOS,
|
||||||
Linux,
|
Linux,
|
||||||
Lv2, // PS3
|
Lv2, // PS3
|
||||||
|
MacOSX,
|
||||||
MinGW32, // i*86-pc-mingw32, *-w64-mingw32
|
MinGW32, // i*86-pc-mingw32, *-w64-mingw32
|
||||||
NetBSD,
|
NetBSD,
|
||||||
OSX,
|
OSX,
|
||||||
@ -269,7 +270,8 @@ public:
|
|||||||
/// isOSX - Is this an OS X triple. For legacy reasons, we support both
|
/// isOSX - Is this an OS X triple. For legacy reasons, we support both
|
||||||
/// "darwin" and "osx" as OS X triples.
|
/// "darwin" and "osx" as OS X triples.
|
||||||
bool isOSX() const {
|
bool isOSX() const {
|
||||||
return getOS() == Triple::Darwin || getOS() == Triple::OSX;
|
return getOS() == Triple::Darwin || getOS() == Triple::OSX ||
|
||||||
|
getOS() == Triple::MacOSX;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
|
/// isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
|
||||||
@ -291,7 +293,7 @@ public:
|
|||||||
assert(isOSX() && "Not an OS X triple!");
|
assert(isOSX() && "Not an OS X triple!");
|
||||||
|
|
||||||
// If this is OS X, expect a sane version number.
|
// If this is OS X, expect a sane version number.
|
||||||
if (getOS() == Triple::OSX)
|
if (getOS() == Triple::OSX || getOS() == Triple::MacOSX)
|
||||||
return isOSVersionLT(Major, Minor, Micro);
|
return isOSVersionLT(Major, Minor, Micro);
|
||||||
|
|
||||||
// Otherwise, compare to the "Darwin" number.
|
// Otherwise, compare to the "Darwin" number.
|
||||||
|
@ -102,6 +102,7 @@ const char *Triple::getOSTypeName(OSType Kind) {
|
|||||||
case IOS: return "ios";
|
case IOS: return "ios";
|
||||||
case Linux: return "linux";
|
case Linux: return "linux";
|
||||||
case Lv2: return "lv2";
|
case Lv2: return "lv2";
|
||||||
|
case MacOSX: return "macosx";
|
||||||
case MinGW32: return "mingw32";
|
case MinGW32: return "mingw32";
|
||||||
case NetBSD: return "netbsd";
|
case NetBSD: return "netbsd";
|
||||||
case OSX: return "osx";
|
case OSX: return "osx";
|
||||||
@ -322,6 +323,8 @@ Triple::OSType Triple::ParseOS(StringRef OSName) {
|
|||||||
return Linux;
|
return Linux;
|
||||||
else if (OSName.startswith("lv2"))
|
else if (OSName.startswith("lv2"))
|
||||||
return Lv2;
|
return Lv2;
|
||||||
|
else if (OSName.startswith("macosx"))
|
||||||
|
return MacOSX;
|
||||||
else if (OSName.startswith("mingw32"))
|
else if (OSName.startswith("mingw32"))
|
||||||
return MinGW32;
|
return MinGW32;
|
||||||
else if (OSName.startswith("netbsd"))
|
else if (OSName.startswith("netbsd"))
|
||||||
|
Loading…
Reference in New Issue
Block a user