llvm.org GIT mirror llvm / fc7d8c4
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306237 91177308-0d34-0410-b5e6-96231b3b80d8 Ed Schouten 2 years ago
3 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
146146 enum OSType {
147147 UnknownOS,
148148
149 Ananas,
149150 CloudABI,
150151 Darwin,
151152 DragonFly,
173173 switch (Kind) {
174174 case UnknownOS: return "unknown";
175175
176 case Ananas: return "ananas";
176177 case CloudABI: return "cloudabi";
177178 case Darwin: return "darwin";
178179 case DragonFly: return "dragonfly";
454455
455456 static Triple::OSType parseOS(StringRef OSName) {
456457 return StringSwitch(OSName)
458 .StartsWith("ananas", Triple::Ananas)
457459 .StartsWith("cloudabi", Triple::CloudABI)
458460 .StartsWith("darwin", Triple::Darwin)
459461 .StartsWith("dragonfly", Triple::DragonFly)
198198 EXPECT_EQ(Triple::spir64, T.getArch());
199199 EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
200200 EXPECT_EQ(Triple::UnknownOS, T.getOS());
201
202 T = Triple("x86_64-unknown-ananas");
203 EXPECT_EQ(Triple::x86_64, T.getArch());
204 EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
205 EXPECT_EQ(Triple::Ananas, T.getOS());
206 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
201207
202208 T = Triple("x86_64-unknown-cloudabi");
203209 EXPECT_EQ(Triple::x86_64, T.getArch());