llvm.org GIT mirror llvm / 679cc50
[mips] Recognise the triple used by Debian for MIPS n32 ABI Triples like mips64-linux-gnuabin32 are documented in this article: https://wiki.debian.org/Multiarch/Tuples git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313231 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Atanasyan 2 years ago
3 changed file(s) with 12 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
184184 UnknownEnvironment,
185185
186186 GNU,
187 GNUABIN32,
187188 GNUABI64,
188189 GNUEABI,
189190 GNUEABIHF,
495496
496497 bool isGNUEnvironment() const {
497498 EnvironmentType Env = getEnvironment();
498 return Env == Triple::GNU || Env == Triple::GNUABI64 ||
499 Env == Triple::GNUEABI || Env == Triple::GNUEABIHF ||
500 Env == Triple::GNUX32;
499 return Env == Triple::GNU || Env == Triple::GNUABIN32 ||
500 Env == Triple::GNUABI64 || Env == Triple::GNUEABI ||
501 Env == Triple::GNUEABIHF || Env == Triple::GNUX32;
501502 }
502503
503504 bool isOSContiki() const {
215215 switch (Kind) {
216216 case UnknownEnvironment: return "unknown";
217217 case GNU: return "gnu";
218 case GNUABIN32: return "gnuabin32";
218219 case GNUABI64: return "gnuabi64";
219220 case GNUEABIHF: return "gnueabihf";
220221 case GNUEABI: return "gnueabi";
504505 return StringSwitch(EnvironmentName)
505506 .StartsWith("eabihf", Triple::EABIHF)
506507 .StartsWith("eabi", Triple::EABI)
508 .StartsWith("gnuabin32", Triple::GNUABIN32)
507509 .StartsWith("gnuabi64", Triple::GNUABI64)
508510 .StartsWith("gnueabihf", Triple::GNUEABIHF)
509511 .StartsWith("gnueabi", Triple::GNUEABI)
330330 EXPECT_EQ(Triple::ImaginationTechnologies, T.getVendor());
331331 EXPECT_EQ(Triple::Linux, T.getOS());
332332 EXPECT_EQ(Triple::GNU, T.getEnvironment());
333
334 T = Triple("mips64el-img-linux-gnuabin32");
335 EXPECT_EQ(Triple::mips64el, T.getArch());
336 EXPECT_EQ(Triple::ImaginationTechnologies, T.getVendor());
337 EXPECT_EQ(Triple::Linux, T.getOS());
338 EXPECT_EQ(Triple::GNUABIN32, T.getEnvironment());
333339
334340 T = Triple("mips64el-unknown-linux-gnuabi64");
335341 EXPECT_EQ(Triple::mips64el, T.getArch());