mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
Add support for Ananas platform
Ananas is a home-brew operating system, mainly for amd64 machines. After using GCC for quite some time, it has switched to clang and never looked back - yet, having to manually patch things is annoying, so it'd be much nicer if this was in the official tree. More information: https://github.com/zhmu/ananas/ https://rink.nu/projects/ananas.html Submitted by: Rink Springer Differential Revision: https://reviews.llvm.org/D32937 llvm-svn: 306237
This commit is contained in:
parent
95d973f08b
commit
d504621d0f
@ -147,6 +147,7 @@ public:
|
||||
enum OSType {
|
||||
UnknownOS,
|
||||
|
||||
Ananas,
|
||||
CloudABI,
|
||||
Darwin,
|
||||
DragonFly,
|
||||
|
@ -174,6 +174,7 @@ StringRef Triple::getOSTypeName(OSType Kind) {
|
||||
switch (Kind) {
|
||||
case UnknownOS: return "unknown";
|
||||
|
||||
case Ananas: return "ananas";
|
||||
case CloudABI: return "cloudabi";
|
||||
case Darwin: return "darwin";
|
||||
case DragonFly: return "dragonfly";
|
||||
@ -455,6 +456,7 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
|
||||
|
||||
static Triple::OSType parseOS(StringRef OSName) {
|
||||
return StringSwitch<Triple::OSType>(OSName)
|
||||
.StartsWith("ananas", Triple::Ananas)
|
||||
.StartsWith("cloudabi", Triple::CloudABI)
|
||||
.StartsWith("darwin", Triple::Darwin)
|
||||
.StartsWith("dragonfly", Triple::DragonFly)
|
||||
|
@ -200,6 +200,12 @@ TEST(TripleTest, ParsedIDs) {
|
||||
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
|
||||
EXPECT_EQ(Triple::UnknownOS, T.getOS());
|
||||
|
||||
T = Triple("x86_64-unknown-ananas");
|
||||
EXPECT_EQ(Triple::x86_64, T.getArch());
|
||||
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
|
||||
EXPECT_EQ(Triple::Ananas, T.getOS());
|
||||
EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
|
||||
|
||||
T = Triple("x86_64-unknown-cloudabi");
|
||||
EXPECT_EQ(Triple::x86_64, T.getArch());
|
||||
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
|
||||
|
Loading…
x
Reference in New Issue
Block a user