llvm.org GIT mirror llvm / 2e522d0
Add powerpc-ibm-aix to Triple. Patch by Kai. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165792 91177308-0d34-0410-b5e6-96231b3b80d8 Duncan Sands 6 years ago
3 changed file(s) with 20 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
7575 SCEI,
7676 BGP,
7777 BGQ,
78 Freescale
78 Freescale,
79 IBM
7980 };
8081 enum OSType {
8182 UnknownOS,
100101 RTEMS,
101102 NativeClient,
102103 CNK, // BG/P Compute-Node Kernel
103 Bitrig
104 Bitrig,
105 AIX
104106 };
105107 enum EnvironmentType {
106108 UnknownEnvironment,
9797 case BGP: return "bgp";
9898 case BGQ: return "bgq";
9999 case Freescale: return "fsl";
100 case IBM: return "ibm";
100101 }
101102
102103 llvm_unreachable("Invalid VendorType!");
127128 case NativeClient: return "nacl";
128129 case CNK: return "cnk";
129130 case Bitrig: return "bitrig";
131 case AIX: return "aix";
130132 }
131133
132134 llvm_unreachable("Invalid OSType");
277279 .Case("bgp", Triple::BGP)
278280 .Case("bgq", Triple::BGQ)
279281 .Case("fsl", Triple::Freescale)
282 .Case("ibm", Triple::IBM)
280283 .Default(Triple::UnknownVendor);
281284 }
282285
303306 .StartsWith("nacl", Triple::NativeClient)
304307 .StartsWith("cnk", Triple::CNK)
305308 .StartsWith("bitrig", Triple::Bitrig)
309 .StartsWith("aix", Triple::AIX)
306310 .Default(Triple::UnknownOS);
307311 }
308312
102102 EXPECT_EQ(Triple::ppc64, T.getArch());
103103 EXPECT_EQ(Triple::BGQ, T.getVendor());
104104 EXPECT_EQ(Triple::Linux, T.getOS());
105 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
106
107 T = Triple("powerpc-ibm-aix");
108 EXPECT_EQ(Triple::ppc, T.getArch());
109 EXPECT_EQ(Triple::IBM, T.getVendor());
110 EXPECT_EQ(Triple::AIX, T.getOS());
111 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
112
113 T = Triple("powerpc64-ibm-aix");
114 EXPECT_EQ(Triple::ppc64, T.getArch());
115 EXPECT_EQ(Triple::IBM, T.getVendor());
116 EXPECT_EQ(Triple::AIX, T.getOS());
105117 EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
106118
107119 T = Triple("powerpc-dunno-notsure");