-Triple::VendorType Triple::ParseVendor(StringRef VendorName) {
- return StringSwitch<VendorType>(VendorName)
- .Case("apple", Apple)
- .Case("pc", PC)
- .Case("scei", SCEI)
- .Default(UnknownVendor);
-}
-
-Triple::OSType Triple::ParseOS(StringRef OSName) {
- return StringSwitch<OSType>(OSName)
- .StartsWith("auroraux", AuroraUX)
- .StartsWith("cygwin", Cygwin)
- .StartsWith("darwin", Darwin)
- .StartsWith("dragonfly", DragonFly)
- .StartsWith("freebsd", FreeBSD)
- .StartsWith("ios", IOS)
- .StartsWith("kfreebsd", KFreeBSD)
- .StartsWith("linux", Linux)
- .StartsWith("lv2", Lv2)
- .StartsWith("macosx", MacOSX)
- .StartsWith("mingw32", MinGW32)
- .StartsWith("netbsd", NetBSD)
- .StartsWith("openbsd", OpenBSD)
- .StartsWith("psp", Psp)
- .StartsWith("solaris", Solaris)
- .StartsWith("win32", Win32)
- .StartsWith("haiku", Haiku)
- .StartsWith("minix", Minix)
- .StartsWith("rtems", RTEMS)
- .StartsWith("nacl", NativeClient)
- .Default(UnknownOS);
-}
-
-Triple::EnvironmentType Triple::ParseEnvironment(StringRef EnvironmentName) {
- return StringSwitch<EnvironmentType>(EnvironmentName)
- .StartsWith("eabi", EABI)
- .StartsWith("gnueabihf", GNUEABIHF)
- .StartsWith("gnueabi", GNUEABI)
- .StartsWith("gnu", GNU)
- .StartsWith("macho", MachO)
- .StartsWith("androideabi", ANDROIDEABI)
- .Default(UnknownEnvironment);
+static Triple::VendorType parseVendor(StringRef VendorName) {
+ return StringSwitch<Triple::VendorType>(VendorName)
+ .Case("apple", Triple::Apple)
+ .Case("pc", Triple::PC)
+ .Case("scei", Triple::SCEI)
+ .Case("bgp", Triple::BGP)
+ .Case("bgq", Triple::BGQ)
+ .Default(Triple::UnknownVendor);
+}
+
+static Triple::OSType parseOS(StringRef OSName) {
+ return StringSwitch<Triple::OSType>(OSName)
+ .StartsWith("auroraux", Triple::AuroraUX)
+ .StartsWith("cygwin", Triple::Cygwin)
+ .StartsWith("darwin", Triple::Darwin)
+ .StartsWith("dragonfly", Triple::DragonFly)
+ .StartsWith("freebsd", Triple::FreeBSD)
+ .StartsWith("ios", Triple::IOS)
+ .StartsWith("kfreebsd", Triple::KFreeBSD)
+ .StartsWith("linux", Triple::Linux)
+ .StartsWith("lv2", Triple::Lv2)
+ .StartsWith("macosx", Triple::MacOSX)
+ .StartsWith("mingw32", Triple::MinGW32)
+ .StartsWith("netbsd", Triple::NetBSD)
+ .StartsWith("openbsd", Triple::OpenBSD)
+ .StartsWith("solaris", Triple::Solaris)
+ .StartsWith("win32", Triple::Win32)
+ .StartsWith("haiku", Triple::Haiku)
+ .StartsWith("minix", Triple::Minix)
+ .StartsWith("rtems", Triple::RTEMS)
+ .StartsWith("nacl", Triple::NativeClient)
+ .StartsWith("cnk", Triple::CNK)
+ .Default(Triple::UnknownOS);
+}
+
+static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
+ return StringSwitch<Triple::EnvironmentType>(EnvironmentName)
+ .StartsWith("eabi", Triple::EABI)
+ .StartsWith("gnueabihf", Triple::GNUEABIHF)
+ .StartsWith("gnueabi", Triple::GNUEABI)
+ .StartsWith("gnu", Triple::GNU)
+ .StartsWith("macho", Triple::MachO)
+ .StartsWith("androideabi", Triple::ANDROIDEABI)
+ .Default(Triple::UnknownEnvironment);