Lines Matching refs:Triple
1 //===--- Triple.cpp - Target triple helper class --------------------------===//
10 #include "llvm/ADT/Triple.h"
20 StringRef Triple::getArchTypeName(ArchType Kind) {
77 StringRef Triple::getArchTypePrefix(ArchType Kind) {
146 StringRef Triple::getVendorTypeName(VendorType Kind) {
169 StringRef Triple::getOSTypeName(OSType Kind) {
208 StringRef Triple::getEnvironmentTypeName(EnvironmentType Kind) {
234 static Triple::ArchType parseBPFArch(StringRef ArchName) {
237 return Triple::bpfel;
239 return Triple::bpfeb;
241 return Triple::bpfeb;
243 return Triple::bpfel;
245 return Triple::UnknownArch;
249 Triple::ArchType Triple::getArchTypeForLLVMName(StringRef Name) {
250 Triple::ArchType BPFArch(parseBPFArch(Name));
251 return StringSwitch<Triple::ArchType>(Name)
304 static Triple::ArchType parseARMArch(StringRef ArchName) {
308 Triple::ArchType arch = Triple::UnknownArch;
313 arch = Triple::arm;
316 arch = Triple::thumb;
319 arch = Triple::aarch64;
327 arch = Triple::armeb;
330 arch = Triple::thumbeb;
333 arch = Triple::aarch64_be;
342 return Triple::UnknownArch;
347 return Triple::UnknownArch;
354 return Triple::thumbeb;
356 return Triple::thumb;
362 static Triple::ArchType parseArch(StringRef ArchName) {
363 auto AT = StringSwitch<Triple::ArchType>(ArchName)
364 .Cases("i386", "i486", "i586", "i686", Triple::x86)
366 .Cases("i786", "i886", "i986", Triple::x86)
367 .Cases("amd64", "x86_64", "x86_64h", Triple::x86_64)
368 .Cases("powerpc", "ppc32", Triple::ppc)
369 .Cases("powerpc64", "ppu", "ppc64", Triple::ppc64)
370 .Cases("powerpc64le", "ppc64le", Triple::ppc64le)
371 .Case("xscale", Triple::arm)
372 .Case("xscaleeb", Triple::armeb)
373 .Case("aarch64", Triple::aarch64)
374 .Case("aarch64_be", Triple::aarch64_be)
375 .Case("arm64", Triple::aarch64)
376 .Case("arm", Triple::arm)
377 .Case("armeb", Triple::armeb)
378 .Case("thumb", Triple::thumb)
379 .Case("thumbeb", Triple::thumbeb)
380 .Case("avr", Triple::avr)
381 .Case("msp430", Triple::msp430)
382 .Cases("mips", "mipseb", "mipsallegrex", Triple::mips)
383 .Cases("mipsel", "mipsallegrexel", Triple::mipsel)
384 .Cases("mips64", "mips64eb", Triple::mips64)
385 .Case("mips64el", Triple::mips64el)
386 .Case("r600", Triple::r600)
387 .Case("amdgcn", Triple::amdgcn)
388 .Case("riscv32", Triple::riscv32)
389 .Case("riscv64", Triple::riscv64)
390 .Case("hexagon", Triple::hexagon)
391 .Cases("s390x", "systemz", Triple::systemz)
392 .Case("sparc", Triple::sparc)
393 .Case("sparcel", Triple::sparcel)
394 .Cases("sparcv9", "sparc64", Triple::sparcv9)
395 .Case("tce", Triple::tce)
396 .Case("tcele", Triple::tcele)
397 .Case("xcore", Triple::xcore)
398 .Case("nvptx", Triple::nvptx)
399 .Case("nvptx64", Triple::nvptx64)
400 .Case("le32", Triple::le32)
401 .Case("le64", Triple::le64)
402 .Case("amdil", Triple::amdil)
403 .Case("amdil64", Triple::amdil64)
404 .Case("hsail", Triple::hsail)
405 .Case("hsail64", Triple::hsail64)
406 .Case("spir", Triple::spir)
407 .Case("spir64", Triple::spir64)
408 .StartsWith("kalimba", Triple::kalimba)
409 .Case("lanai", Triple::lanai)
410 .Case("shave", Triple::shave)
411 .Case("wasm32", Triple::wasm32)
412 .Case("wasm64", Triple::wasm64)
413 .Case("renderscript32", Triple::renderscript32)
414 .Case("renderscript64", Triple::renderscript64)
415 .Default(Triple::UnknownArch);
419 if (AT == Triple::UnknownArch) {
430 static Triple::VendorType parseVendor(StringRef VendorName) {
431 return StringSwitch<Triple::VendorType>(VendorName)
432 .Case("apple", Triple::Apple)
433 .Case("pc", Triple::PC)
434 .Case("scei", Triple::SCEI)
435 .Case("bgp", Triple::BGP)
436 .Case("bgq", Triple::BGQ)
437 .Case("fsl", Triple::Freescale)
438 .Case("ibm", Triple::IBM)
439 .Case("img", Triple::ImaginationTechnologies)
440 .Case("mti", Triple::MipsTechnologies)
441 .Case("nvidia", Triple::NVIDIA)
442 .Case("csr", Triple::CSR)
443 .Case("myriad", Triple::Myriad)
444 .Case("amd", Triple::AMD)
445 .Case("mesa", Triple::Mesa)
446 .Default(Triple::UnknownVendor);
449 static Triple::OSType parseOS(StringRef OSName) {
450 return StringSwitch<Triple::OSType>(OSName)
451 .StartsWith("cloudabi", Triple::CloudABI)
452 .StartsWith("darwin", Triple::Darwin)
453 .StartsWith("dragonfly", Triple::DragonFly)
454 .StartsWith("freebsd", Triple::FreeBSD)
455 .StartsWith("fuchsia", Triple::Fuchsia)
456 .StartsWith("ios", Triple::IOS)
457 .StartsWith("kfreebsd", Triple::KFreeBSD)
458 .StartsWith("linux", Triple::Linux)
459 .StartsWith("lv2", Triple::Lv2)
460 .StartsWith("macosx", Triple::MacOSX)
461 .StartsWith("netbsd", Triple::NetBSD)
462 .StartsWith("openbsd", Triple::OpenBSD)
463 .StartsWith("solaris", Triple::Solaris)
464 .StartsWith("win32", Triple::Win32)
465 .StartsWith("windows", Triple::Win32)
466 .StartsWith("haiku", Triple::Haiku)
467 .StartsWith("minix", Triple::Minix)
468 .StartsWith("rtems", Triple::RTEMS)
469 .StartsWith("nacl", Triple::NaCl)
470 .StartsWith("cnk", Triple::CNK)
471 .StartsWith("bitrig", Triple::Bitrig)
472 .StartsWith("aix", Triple::AIX)
473 .StartsWith("cuda", Triple::CUDA)
474 .StartsWith("nvcl", Triple::NVCL)
475 .StartsWith("amdhsa", Triple::AMDHSA)
476 .StartsWith("ps4", Triple::PS4)
477 .StartsWith("elfiamcu", Triple::ELFIAMCU)
478 .StartsWith("tvos", Triple::TvOS)
479 .StartsWith("watchos", Triple::WatchOS)
480 .StartsWith("mesa3d", Triple::Mesa3D)
481 .StartsWith("contiki", Triple::Contiki)
482 .Default(Triple::UnknownOS);
485 static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName) {
486 return StringSwitch<Triple::EnvironmentType>(EnvironmentName)
487 .StartsWith("eabihf", Triple::EABIHF)
488 .StartsWith("eabi", Triple::EABI)
489 .StartsWith("gnuabi64", Triple::GNUABI64)
490 .StartsWith("gnueabihf", Triple::GNUEABIHF)
491 .StartsWith("gnueabi", Triple::GNUEABI)
492 .StartsWith("gnux32", Triple::GNUX32)
493 .StartsWith("code16", Triple::CODE16)
494 .StartsWith("gnu", Triple::GNU)
495 .StartsWith("android", Triple::Android)
496 .StartsWith("musleabihf", Triple::MuslEABIHF)
497 .StartsWith("musleabi", Triple::MuslEABI)
498 .StartsWith("musl", Triple::Musl)
499 .StartsWith("msvc", Triple::MSVC)
500 .StartsWith("itanium", Triple::Itanium)
501 .StartsWith("cygnus", Triple::Cygnus)
502 .StartsWith("amdopencl", Triple::AMDOpenCL)
503 .StartsWith("coreclr", Triple::CoreCLR)
504 .StartsWith("opencl", Triple::OpenCL)
505 .Default(Triple::UnknownEnvironment);
508 static Triple::ObjectFormatType parseFormat(StringRef EnvironmentName) {
509 return StringSwitch<Triple::ObjectFormatType>(EnvironmentName)
510 .EndsWith("coff", Triple::COFF)
511 .EndsWith("elf", Triple::ELF)
512 .EndsWith("macho", Triple::MachO)
513 .Default(Triple::UnknownObjectFormat);
516 static Triple::SubArchType parseSubArch(StringRef SubArchName) {
521 return StringSwitch<Triple::SubArchType>(SubArchName)
522 .EndsWith("kalimba3", Triple::KalimbaSubArch_v3)
523 .EndsWith("kalimba4", Triple::KalimbaSubArch_v4)
524 .EndsWith("kalimba5", Triple::KalimbaSubArch_v5)
525 .Default(Triple::NoSubArch);
530 return Triple::NoSubArch;
532 return Triple::ARMSubArch_v4t;
534 return Triple::ARMSubArch_v5;
540 return Triple::ARMSubArch_v5te;
542 return Triple::ARMSubArch_v6;
545 return Triple::ARMSubArch_v6k;
547 return Triple::ARMSubArch_v6t2;
549 return Triple::ARMSubArch_v6m;
552 return Triple::ARMSubArch_v7;
554 return Triple::ARMSubArch_v7k;
556 return Triple::ARMSubArch_v7m;
558 return Triple::ARMSubArch_v7s;
560 return Triple::ARMSubArch_v7em;
562 return Triple::ARMSubArch_v8;
564 return Triple::ARMSubArch_v8_1a;
566 return Triple::ARMSubArch_v8_2a;
568 return Triple::ARMSubArch_v8r;
570 return Triple::ARMSubArch_v8m_baseline;
572 return Triple::ARMSubArch_v8m_mainline;
574 return Triple::NoSubArch;
578 static StringRef getObjectFormatTypeName(Triple::ObjectFormatType Kind) {
580 case Triple::UnknownObjectFormat: return "";
581 case Triple::COFF: return "coff";
582 case Triple::ELF: return "elf";
583 case Triple::MachO: return "macho";
588 static Triple::ObjectFormatType getDefaultFormat(const Triple &T) {
590 case Triple::UnknownArch:
591 case Triple::aarch64:
592 case Triple::arm:
593 case Triple::thumb:
594 case Triple::x86:
595 case Triple::x86_64:
597 return Triple::MachO;
599 return Triple::COFF;
600 return Triple::ELF;
602 case Triple::aarch64_be:
603 case Triple::amdgcn:
604 case Triple::amdil:
605 case Triple::amdil64:
606 case Triple::armeb:
607 case Triple::avr:
608 case Triple::bpfeb:
609 case Triple::bpfel:
610 case Triple::hexagon:
611 case Triple::lanai:
612 case Triple::hsail:
613 case Triple::hsail64:
614 case Triple::kalimba:
615 case Triple::le32:
616 case Triple::le64:
617 case Triple::mips:
618 case Triple::mips64:
619 case Triple::mips64el:
620 case Triple::mipsel:
621 case Triple::msp430:
622 case Triple::nvptx:
623 case Triple::nvptx64:
624 case Triple::ppc64le:
625 case Triple::r600:
626 case Triple::renderscript32:
627 case Triple::renderscript64:
628 case Triple::riscv32:
629 case Triple::riscv64:
630 case Triple::shave:
631 case Triple::sparc:
632 case Triple::sparcel:
633 case Triple::sparcv9:
634 case Triple::spir:
635 case Triple::spir64:
636 case Triple::systemz:
637 case Triple::tce:
638 case Triple::tcele:
639 case Triple::thumbeb:
640 case Triple::wasm32:
641 case Triple::wasm64:
642 case Triple::xcore:
643 return Triple::ELF;
645 case Triple::ppc:
646 case Triple::ppc64:
648 return Triple::MachO;
649 return Triple::ELF;
654 /// \brief Construct a triple from the string representation provided.
658 Triple::Triple(const Twine &Str)
683 /// \brief Construct a triple from string representations of the architecture,
689 Triple::Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr)
695 Environment(), ObjectFormat(Triple::UnknownObjectFormat) {
699 /// \brief Construct a triple from string representations of the architecture,
704 Triple::Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr,
714 if (ObjectFormat == Triple::UnknownObjectFormat)
718 std::string Triple::normalize(StringRef Str) {
858 if (Environment == Triple::Android && Components[3].startswith("androideabi")) {
868 if (OS == Triple::Win32) {
872 if (ObjectFormat == UnknownObjectFormat || ObjectFormat == Triple::COFF)
887 (OS == Triple::Win32 && Environment != UnknownEnvironment)) {
888 if (ObjectFormat != UnknownObjectFormat && ObjectFormat != Triple::COFF) {
903 StringRef Triple::getArchName() const {
907 StringRef Triple::getVendorName() const {
912 StringRef Triple::getOSName() const {
918 StringRef Triple::getEnvironmentName() const {
924 StringRef Triple::getOSAndEnvironmentName() const {
964 void Triple::getEnvironmentVersion(unsigned &Major, unsigned &Minor,
974 void Triple::getOSVersion(unsigned &Major, unsigned &Minor,
977 // Assume that the OS portion of the triple starts with the canonical name.
985 bool Triple::getMacOSXVersion(unsigned &Major, unsigned &Minor,
990 default: llvm_unreachable("unexpected OS for Darwin triple");
1014 // Ignore the version from the triple
1026 void Triple::getiOSVersion(unsigned &Major, unsigned &Minor,
1029 default: llvm_unreachable("unexpected OS for Darwin triple");
1032 // Ignore the version from the triple. This is only handled because the
1048 llvm_unreachable("conflicting triple info");
1052 void Triple::getWatchOSVersion(unsigned &Major, unsigned &Minor,
1055 default: llvm_unreachable("unexpected OS for Darwin triple");
1058 // Ignore the version from the triple. This is only handled because the
1072 llvm_unreachable("conflicting triple info");
1076 void Triple::setTriple(const Twine &Str) {
1077 *this = Triple(Str);
1080 void Triple::setArch(ArchType Kind) {
1084 void Triple::setVendor(VendorType Kind) {
1088 void Triple::setOS(OSType Kind) {
1092 void Triple::setEnvironment(EnvironmentType Kind) {
1100 void Triple::setObjectFormat(ObjectFormatType Kind) {
1108 void Triple::setArchName(StringRef Str) {
1110 SmallString<64> Triple;
1111 Triple += Str;
1112 Triple += "-";
1113 Triple += getVendorName();
1114 Triple += "-";
1115 Triple += getOSAndEnvironmentName();
1116 setTriple(Triple);
1119 void Triple::setVendorName(StringRef Str) {
1123 void Triple::setOSName(StringRef Str) {
1131 void Triple::setEnvironmentName(StringRef Str) {
1136 void Triple::setOSAndEnvironmentName(StringRef Str) {
1140 static unsigned getArchPointerBitWidth(llvm::Triple::ArchType Arch) {
1142 case llvm::Triple::UnknownArch:
1145 case llvm::Triple::avr:
1146 case llvm::Triple::msp430:
1149 case llvm::Triple::arm:
1150 case llvm::Triple::armeb:
1151 case llvm::Triple::hexagon:
1152 case llvm::Triple::le32:
1153 case llvm::Triple::mips:
1154 case llvm::Triple::mipsel:
1155 case llvm::Triple::nvptx:
1156 case llvm::Triple::ppc:
1157 case llvm::Triple::r600:
1158 case llvm::Triple::riscv32:
1159 case llvm::Triple::sparc:
1160 case llvm::Triple::sparcel:
1161 case llvm::Triple::tce:
1162 case llvm::Triple::tcele:
1163 case llvm::Triple::thumb:
1164 case llvm::Triple::thumbeb:
1165 case llvm::Triple::x86:
1166 case llvm::Triple::xcore:
1167 case llvm::Triple::amdil:
1168 case llvm::Triple::hsail:
1169 case llvm::Triple::spir:
1170 case llvm::Triple::kalimba:
1171 case llvm::Triple::lanai:
1172 case llvm::Triple::shave:
1173 case llvm::Triple::wasm32:
1174 case llvm::Triple::renderscript32:
1177 case llvm::Triple::aarch64:
1178 case llvm::Triple::aarch64_be:
1179 case llvm::Triple::amdgcn:
1180 case llvm::Triple::bpfel:
1181 case llvm::Triple::bpfeb:
1182 case llvm::Triple::le64:
1183 case llvm::Triple::mips64:
1184 case llvm::Triple::mips64el:
1185 case llvm::Triple::nvptx64:
1186 case llvm::Triple::ppc64:
1187 case llvm::Triple::ppc64le:
1188 case llvm::Triple::riscv64:
1189 case llvm::Triple::sparcv9:
1190 case llvm::Triple::systemz:
1191 case llvm::Triple::x86_64:
1192 case llvm::Triple::amdil64:
1193 case llvm::Triple::hsail64:
1194 case llvm::Triple::spir64:
1195 case llvm::Triple::wasm64:
1196 case llvm::Triple::renderscript64:
1202 bool Triple::isArch64Bit() const {
1206 bool Triple::isArch32Bit() const {
1210 bool Triple::isArch16Bit() const {
1214 Triple Triple::get32BitArchVariant() const {
1215 Triple T(*this);
1217 case Triple::UnknownArch:
1218 case Triple::amdgcn:
1219 case Triple::avr:
1220 case Triple::bpfel:
1221 case Triple::bpfeb:
1222 case Triple::msp430:
1223 case Triple::systemz:
1224 case Triple::ppc64le:
1228 case Triple::amdil:
1229 case Triple::hsail:
1230 case Triple::spir:
1231 case Triple::arm:
1232 case Triple::armeb:
1233 case Triple::hexagon:
1234 case Triple::kalimba:
1235 case Triple::le32:
1236 case Triple::mips:
1237 case Triple::mipsel:
1238 case Triple::nvptx:
1239 case Triple::ppc:
1240 case Triple::r600:
1241 case Triple::riscv32:
1242 case Triple::sparc:
1243 case Triple::sparcel:
1244 case Triple::tce:
1245 case Triple::tcele:
1246 case Triple::thumb:
1247 case Triple::thumbeb:
1248 case Triple::x86:
1249 case Triple::xcore:
1250 case Triple::lanai:
1251 case Triple::shave:
1252 case Triple::wasm32:
1253 case Triple::renderscript32:
1257 case Triple::aarch64: T.setArch(Triple::arm); break;
1258 case Triple::aarch64_be: T.setArch(Triple::armeb); break;
1259 case Triple::le64: T.setArch(Triple::le32); break;
1260 case Triple::mips64: T.setArch(Triple::mips); break;
1261 case Triple::mips64el: T.setArch(Triple::mipsel); break;
1262 case Triple::nvptx64: T.setArch(Triple::nvptx); break;
1263 case Triple::ppc64: T.setArch(Triple::ppc); break;
1264 case Triple::sparcv9: T.setArch(Triple::sparc); break;
1265 case Triple::riscv64: T.setArch(Triple::riscv32); break;
1266 case Triple::x86_64: T.setArch(Triple::x86); break;
1267 case Triple::amdil64: T.setArch(Triple::amdil); break;
1268 case Triple::hsail64: T.setArch(Triple::hsail); break;
1269 case Triple::spir64: T.setArch(Triple::spir); break;
1270 case Triple::wasm64: T.setArch(Triple::wasm32); break;
1271 case Triple::renderscript64: T.setArch(Triple::renderscript32); break;
1276 Triple Triple::get64BitArchVariant() const {
1277 Triple T(*this);
1279 case Triple::UnknownArch:
1280 case Triple::avr:
1281 case Triple::hexagon:
1282 case Triple::kalimba:
1283 case Triple::lanai:
1284 case Triple::msp430:
1285 case Triple::r600:
1286 case Triple::tce:
1287 case Triple::tcele:
1288 case Triple::xcore:
1289 case Triple::sparcel:
1290 case Triple::shave:
1294 case Triple::aarch64:
1295 case Triple::aarch64_be:
1296 case Triple::bpfel:
1297 case Triple::bpfeb:
1298 case Triple::le64:
1299 case Triple::amdil64:
1300 case Triple::amdgcn:
1301 case Triple::hsail64:
1302 case Triple::spir64:
1303 case Triple::mips64:
1304 case Triple::mips64el:
1305 case Triple::nvptx64:
1306 case Triple::ppc64:
1307 case Triple::ppc64le:
1308 case Triple::riscv64:
1309 case Triple::sparcv9:
1310 case Triple::systemz:
1311 case Triple::x86_64:
1312 case Triple::wasm64:
1313 case Triple::renderscript64:
1317 case Triple::arm: T.setArch(Triple::aarch64); break;
1318 case Triple::armeb: T.setArch(Triple::aarch64_be); break;
1319 case Triple::le32: T.setArch(Triple::le64); break;
1320 case Triple::mips: T.setArch(Triple::mips64); break;
1321 case Triple::mipsel: T.setArch(Triple::mips64el); break;
1322 case Triple::nvptx: T.setArch(Triple::nvptx64); break;
1323 case Triple::ppc: T.setArch(Triple::ppc64); break;
1324 case Triple::sparc: T.setArch(Triple::sparcv9); break;
1325 case Triple::riscv32: T.setArch(Triple::riscv64); break;
1326 case Triple::x86: T.setArch(Triple::x86_64); break;
1327 case Triple::amdil: T.setArch(Triple::amdil64); break;
1328 case Triple::hsail: T.setArch(Triple::hsail64); break;
1329 case Triple::spir: T.setArch(Triple::spir64); break;
1330 case Triple::thumb: T.setArch(Triple::aarch64); break;
1331 case Triple::thumbeb: T.setArch(Triple::aarch64_be); break;
1332 case Triple::wasm32: T.setArch(Triple::wasm64); break;
1333 case Triple::renderscript32: T.setArch(Triple::renderscript64); break;
1338 Triple Triple::getBigEndianArchVariant() const {
1339 Triple T(*this);
1344 case Triple::UnknownArch:
1345 case Triple::amdgcn:
1346 case Triple::amdil64:
1347 case Triple::amdil:
1348 case Triple::avr:
1349 case Triple::hexagon:
1350 case Triple::hsail64:
1351 case Triple::hsail:
1352 case Triple::kalimba:
1353 case Triple::le32:
1354 case Triple::le64:
1355 case Triple::msp430:
1356 case Triple::nvptx64:
1357 case Triple::nvptx:
1358 case Triple::r600:
1359 case Triple::riscv32:
1360 case Triple::riscv64:
1361 case Triple::shave:
1362 case Triple::spir64:
1363 case Triple::spir:
1364 case Triple::wasm32:
1365 case Triple::wasm64:
1366 case Triple::x86:
1367 case Triple::x86_64:
1368 case Triple::xcore:
1369 case Triple::renderscript32:
1370 case Triple::renderscript64:
1374 case Triple::arm:
1375 case Triple::thumb:
1379 case Triple::tcele: T.setArch(Triple::tce); break;
1380 case Triple::aarch64: T.setArch(Triple::aarch64_be); break;
1381 case Triple::bpfel: T.setArch(Triple::bpfeb); break;
1382 case Triple::mips64el:T.setArch(Triple::mips64); break;
1383 case Triple::mipsel: T.setArch(Triple::mips); break;
1384 case Triple::ppc64le: T.setArch(Triple::ppc64); break;
1385 case Triple::sparcel: T.setArch(Triple::sparc); break;
1387 llvm_unreachable("getBigEndianArchVariant: unknown triple.");
1392 Triple Triple::getLittleEndianArchVariant() const {
1393 Triple T(*this);
1398 case Triple::UnknownArch:
1399 case Triple::lanai:
1400 case Triple::ppc:
1401 case Triple::sparcv9:
1402 case Triple::systemz:
1406 case Triple::armeb:
1407 case Triple::thumbeb:
1411 case Triple::tce: T.setArch(Triple::tcele); break;
1412 case Triple::aarch64_be: T.setArch(Triple::aarch64); break;
1413 case Triple::bpfeb: T.setArch(Triple::bpfel); break;
1414 case Triple::mips64: T.setArch(Triple::mips64el); break;
1415 case Triple::mips: T.setArch(Triple::mipsel); break;
1416 case Triple::ppc64: T.setArch(Triple::ppc64le); break;
1417 case Triple::sparc: T.setArch(Triple::sparcel); break;
1419 llvm_unreachable("getLittleEndianArchVariant: unknown triple.");
1424 bool Triple::isLittleEndian() const {
1426 case Triple::aarch64:
1427 case Triple::amdgcn:
1428 case Triple::amdil64:
1429 case Triple::amdil:
1430 case Triple::arm:
1431 case Triple::avr:
1432 case Triple::bpfel:
1433 case Triple::hexagon:
1434 case Triple::hsail64:
1435 case Triple::hsail:
1436 case Triple::kalimba:
1437 case Triple::le32:
1438 case Triple::le64:
1439 case Triple::mips64el:
1440 case Triple::mipsel:
1441 case Triple::msp430:
1442 case Triple::nvptx64:
1443 case Triple::nvptx:
1444 case Triple::ppc64le:
1445 case Triple::r600:
1446 case Triple::riscv32:
1447 case Triple::riscv64:
1448 case Triple::shave:
1449 case Triple::sparcel:
1450 case Triple::spir64:
1451 case Triple::spir:
1452 case Triple::thumb:
1453 case Triple::wasm32:
1454 case Triple::wasm64:
1455 case Triple::x86:
1456 case Triple::x86_64:
1457 case Triple::xcore:
1458 case Triple::tcele:
1459 case Triple::renderscript32:
1460 case Triple::renderscript64:
1467 StringRef Triple::getARMCPUForArch(StringRef MArch) const {
1474 case llvm::Triple::FreeBSD:
1475 case llvm::Triple::NetBSD:
1479 case llvm::Triple::Win32:
1482 case llvm::Triple::MacOSX:
1483 case llvm::Triple::IOS:
1484 case llvm::Triple::WatchOS:
1485 case llvm::Triple::TvOS:
1503 case llvm::Triple::NetBSD:
1505 case llvm::Triple::GNUEABIHF:
1506 case llvm::Triple::GNUEABI:
1507 case llvm::Triple::EABIHF:
1508 case llvm::Triple::EABI:
1513 case llvm::Triple::NaCl:
1517 case llvm::Triple::EABIHF:
1518 case llvm::Triple::GNUEABIHF:
1519 case llvm::Triple::MuslEABIHF: