Lines Matching refs:Triple
56 const llvm::Triple &Triple) { in getSparcAsmModeForCPU() argument
57 if (Triple.getArch() == llvm::Triple::sparcv9) { in getSparcAsmModeForCPU()
493 static bool isSignedCharDefault(const llvm::Triple &Triple) { in isSignedCharDefault() argument
494 switch (Triple.getArch()) { in isSignedCharDefault()
498 case llvm::Triple::aarch64: in isSignedCharDefault()
499 case llvm::Triple::aarch64_be: in isSignedCharDefault()
500 case llvm::Triple::arm: in isSignedCharDefault()
501 case llvm::Triple::armeb: in isSignedCharDefault()
502 case llvm::Triple::thumb: in isSignedCharDefault()
503 case llvm::Triple::thumbeb: in isSignedCharDefault()
504 if (Triple.isOSDarwin() || Triple.isOSWindows()) in isSignedCharDefault()
508 case llvm::Triple::ppc: in isSignedCharDefault()
509 case llvm::Triple::ppc64: in isSignedCharDefault()
510 if (Triple.isOSDarwin()) in isSignedCharDefault()
514 case llvm::Triple::hexagon: in isSignedCharDefault()
515 case llvm::Triple::ppc64le: in isSignedCharDefault()
516 case llvm::Triple::systemz: in isSignedCharDefault()
517 case llvm::Triple::xcore: in isSignedCharDefault()
522 static bool isNoCommonDefault(const llvm::Triple &Triple) { in isNoCommonDefault() argument
523 switch (Triple.getArch()) { in isNoCommonDefault()
527 case llvm::Triple::xcore: in isNoCommonDefault()
528 case llvm::Triple::wasm32: in isNoCommonDefault()
529 case llvm::Triple::wasm64: in isNoCommonDefault()
537 static int getARMSubArchVersionNumber(const llvm::Triple &Triple) { in getARMSubArchVersionNumber() argument
538 llvm::StringRef Arch = Triple.getArchName(); in getARMSubArchVersionNumber()
543 static bool isARMMProfile(const llvm::Triple &Triple) { in isARMMProfile() argument
544 llvm::StringRef Arch = Triple.getArchName(); in isARMMProfile()
610 const llvm::Triple &Triple) { in checkARMArchName() argument
613 std::string MArch = arm::getARMArch(ArchName, Triple); in checkARMArchName()
623 const llvm::Triple &Triple) { in checkARMCPUName() argument
626 std::string CPU = arm::getARMTargetCPU(CPUName, ArchName, Triple); in checkARMCPUName()
627 if (arm::getLLVMArchSuffixForARM(CPU, ArchName, Triple).empty() || in checkARMCPUName()
632 static bool useAAPCSForMachO(const llvm::Triple &T) { in useAAPCSForMachO()
635 return T.getEnvironment() == llvm::Triple::EABI || in useAAPCSForMachO()
636 T.getOS() == llvm::Triple::UnknownOS || isARMMProfile(T); in useAAPCSForMachO()
643 const llvm::Triple Triple(TC.ComputeEffectiveClangTriple(Args)); in getARMFloatABI() local
644 auto SubArch = getARMSubArchVersionNumber(Triple); in getARMFloatABI()
667 if (Triple.isOSBinFormatMachO() && !useAAPCSForMachO(Triple) && in getARMFloatABI()
670 << Triple.getArchName(); in getARMFloatABI()
676 switch (Triple.getOS()) { in getARMFloatABI()
677 case llvm::Triple::Darwin: in getARMFloatABI()
678 case llvm::Triple::MacOSX: in getARMFloatABI()
679 case llvm::Triple::IOS: in getARMFloatABI()
680 case llvm::Triple::TvOS: { in getARMFloatABI()
685 case llvm::Triple::WatchOS: in getARMFloatABI()
690 case llvm::Triple::Win32: in getARMFloatABI()
694 case llvm::Triple::FreeBSD: in getARMFloatABI()
695 switch (Triple.getEnvironment()) { in getARMFloatABI()
696 case llvm::Triple::GNUEABIHF: in getARMFloatABI()
707 switch (Triple.getEnvironment()) { in getARMFloatABI()
708 case llvm::Triple::GNUEABIHF: in getARMFloatABI()
709 case llvm::Triple::EABIHF: in getARMFloatABI()
712 case llvm::Triple::GNUEABI: in getARMFloatABI()
713 case llvm::Triple::EABI: in getARMFloatABI()
717 case llvm::Triple::Android: in getARMFloatABI()
723 if (Triple.getOS() != llvm::Triple::UnknownOS || in getARMFloatABI()
724 !Triple.isOSBinFormatMachO()) in getARMFloatABI()
736 const llvm::Triple &Triple, in getARMTargetFeatures() argument
794 checkARMArchName(D, WaArch, Args, ArchName, Features, Triple); in getARMTargetFeatures()
799 checkARMArchName(D, ArchArg, Args, ArchName, Features, Triple); in getARMTargetFeatures()
810 checkARMCPUName(D, WaCPU, Args, CPUName, ArchName, Features, Triple); in getARMTargetFeatures()
813 checkARMCPUName(D, CPUArg, Args, CPUName, ArchName, Features, Triple); in getARMTargetFeatures()
864 if (Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v8_1a) { in getARMTargetFeatures()
875 } else if (KernelOrKext && (!Triple.isiOS() || Triple.isOSVersionLT(6)) && in getARMTargetFeatures()
876 !Triple.isWatchOS()) { in getARMTargetFeatures()
887 if (Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m) in getARMTargetFeatures()
905 int VersionNum = getARMSubArchVersionNumber(Triple); in getARMTargetFeatures()
906 if (Triple.isOSDarwin() || Triple.isOSNetBSD()) { in getARMTargetFeatures()
908 Triple.getSubArch() == llvm::Triple::SubArchType::ARMSubArch_v6m) in getARMTargetFeatures()
910 } else if (Triple.isOSLinux() || Triple.isOSNaCl()) { in getARMTargetFeatures()
928 void Clang::AddARMTargetArgs(const llvm::Triple &Triple, const ArgList &Args, in AddARMTargetArgs() argument
936 } else if (Triple.isOSBinFormatMachO()) { in AddARMTargetArgs()
937 if (useAAPCSForMachO(Triple)) { in AddARMTargetArgs()
939 } else if (Triple.isWatchOS()) { in AddARMTargetArgs()
944 } else if (Triple.isOSWindows()) { in AddARMTargetArgs()
949 switch (Triple.getEnvironment()) { in AddARMTargetArgs()
950 case llvm::Triple::Android: in AddARMTargetArgs()
951 case llvm::Triple::GNUEABI: in AddARMTargetArgs()
952 case llvm::Triple::GNUEABIHF: in AddARMTargetArgs()
955 case llvm::Triple::EABIHF: in AddARMTargetArgs()
956 case llvm::Triple::EABI: in AddARMTargetArgs()
960 if (Triple.getOS() == llvm::Triple::NetBSD) in AddARMTargetArgs()
1035 llvm::Triple Triple(TripleStr); in AddAArch64TargetArgs() local
1049 else if (Triple.isOSDarwin()) in AddAArch64TargetArgs()
1064 } else if (Triple.isAndroid()) { in AddAArch64TargetArgs()
1083 void mips::getMipsCPUAndABI(const ArgList &Args, const llvm::Triple &Triple, in getMipsCPUAndABI() argument
1090 if (Triple.getVendor() == llvm::Triple::ImaginationTechnologies && in getMipsCPUAndABI()
1091 Triple.getEnvironment() == llvm::Triple::GNU) { in getMipsCPUAndABI()
1097 if (Triple.isAndroid()) in getMipsCPUAndABI()
1101 if (Triple.getOS() == llvm::Triple::OpenBSD) in getMipsCPUAndABI()
1119 switch (Triple.getArch()) { in getMipsCPUAndABI()
1122 case llvm::Triple::mips: in getMipsCPUAndABI()
1123 case llvm::Triple::mipsel: in getMipsCPUAndABI()
1126 case llvm::Triple::mips64: in getMipsCPUAndABI()
1127 case llvm::Triple::mips64el: in getMipsCPUAndABI()
1135 if (Triple.getArch() == llvm::Triple::mips || in getMipsCPUAndABI()
1136 Triple.getArch() == llvm::Triple::mipsel) in getMipsCPUAndABI()
1154 const llvm::Triple &Triple) { in getMipsABILibSuffix() argument
1156 tools::mips::getMipsCPUAndABI(Args, Triple, CPUName, ABIName); in getMipsABILibSuffix()
1218 static void getMIPSTargetFeatures(const Driver &D, const llvm::Triple &Triple, in getMIPSTargetFeatures() argument
1223 mips::getMipsCPUAndABI(Args, Triple, CPUName, ABIName); in getMIPSTargetFeatures()
1282 } else if (mips::shouldUseFPXX(Args, Triple, CPUName, ABIName, FloatABI)) { in getMIPSTargetFeatures()
1296 const llvm::Triple &Triple = getToolChain().getTriple(); in AddMIPSTargetArgs() local
1297 mips::getMipsCPUAndABI(Args, Triple, CPUName, ABIName); in AddMIPSTargetArgs()
1410 static void getPPCTargetFeatures(const Driver &D, const llvm::Triple &Triple, in getPPCTargetFeatures() argument
1429 !(Triple.getArch() == llvm::Triple::ppc64 || in getPPCTargetFeatures()
1430 Triple.getArch() == llvm::Triple::ppc64le)) in getPPCTargetFeatures()
1433 (Triple.getArch() == llvm::Triple::ppc64 || in getPPCTargetFeatures()
1434 Triple.getArch() == llvm::Triple::ppc64le)) in getPPCTargetFeatures()
1478 case llvm::Triple::ppc64: { in AddPPCTargetArgs()
1494 case llvm::Triple::ppc64le: in AddPPCTargetArgs()
1554 std::string Triple = getToolChain().ComputeEffectiveClangTriple(Args); in AddSparcTargetArgs() local
1570 << Triple; in AddSparcTargetArgs()
1599 const llvm::Triple &Triple) { in getX86TargetCPU() argument
1602 if (Triple.isOSDarwin() && Triple.getArchName() == "x86_64h") in getX86TargetCPU()
1622 if (Triple.getArch() == llvm::Triple::x86) { in getX86TargetCPU()
1642 if (Triple.getArch() != llvm::Triple::x86_64 && in getX86TargetCPU()
1643 Triple.getArch() != llvm::Triple::x86) in getX86TargetCPU()
1646 bool Is64Bit = Triple.getArch() == llvm::Triple::x86_64; in getX86TargetCPU()
1649 if (Triple.isOSDarwin()) { in getX86TargetCPU()
1650 if (Triple.getArchName() == "x86_64h") in getX86TargetCPU()
1656 if (Triple.isPS4CPU()) in getX86TargetCPU()
1660 if (Triple.isAndroid()) in getX86TargetCPU()
1667 switch (Triple.getOS()) { in getX86TargetCPU()
1668 case llvm::Triple::FreeBSD: in getX86TargetCPU()
1669 case llvm::Triple::NetBSD: in getX86TargetCPU()
1670 case llvm::Triple::OpenBSD: in getX86TargetCPU()
1672 case llvm::Triple::Haiku: in getX86TargetCPU()
1674 case llvm::Triple::Bitrig: in getX86TargetCPU()
1701 static std::string getCPUName(const ArgList &Args, const llvm::Triple &T, in getCPUName()
1707 case llvm::Triple::aarch64: in getCPUName()
1708 case llvm::Triple::aarch64_be: in getCPUName()
1711 case llvm::Triple::arm: in getCPUName()
1712 case llvm::Triple::armeb: in getCPUName()
1713 case llvm::Triple::thumb: in getCPUName()
1714 case llvm::Triple::thumbeb: { in getCPUName()
1719 case llvm::Triple::mips: in getCPUName()
1720 case llvm::Triple::mipsel: in getCPUName()
1721 case llvm::Triple::mips64: in getCPUName()
1722 case llvm::Triple::mips64el: { in getCPUName()
1729 case llvm::Triple::nvptx: in getCPUName()
1730 case llvm::Triple::nvptx64: in getCPUName()
1735 case llvm::Triple::ppc: in getCPUName()
1736 case llvm::Triple::ppc64: in getCPUName()
1737 case llvm::Triple::ppc64le: { in getCPUName()
1743 if (T.getArch() == llvm::Triple::ppc64) in getCPUName()
1745 else if (T.getArch() == llvm::Triple::ppc64le) in getCPUName()
1753 case llvm::Triple::sparc: in getCPUName()
1754 case llvm::Triple::sparcel: in getCPUName()
1755 case llvm::Triple::sparcv9: in getCPUName()
1760 case llvm::Triple::x86: in getCPUName()
1761 case llvm::Triple::x86_64: in getCPUName()
1764 case llvm::Triple::hexagon: in getCPUName()
1768 case llvm::Triple::systemz: in getCPUName()
1771 case llvm::Triple::r600: in getCPUName()
1772 case llvm::Triple::amdgcn: in getCPUName()
1775 case llvm::Triple::wasm32: in getCPUName()
1776 case llvm::Triple::wasm64: in getCPUName()
1947 static void getX86TargetFeatures(const Driver &D, const llvm::Triple &Triple, in getX86TargetFeatures() argument
1961 if (Triple.getArchName() == "x86_64h") { in getX86TargetFeatures()
1972 const llvm::Triple::ArchType ArchType = Triple.getArch(); in getX86TargetFeatures()
1974 if (Triple.isAndroid()) { in getX86TargetFeatures()
1975 if (ArchType == llvm::Triple::x86_64) { in getX86TargetFeatures()
1987 if (ArchType == llvm::Triple::x86_64 || ArchType == llvm::Triple::x86) { in getX86TargetFeatures()
1994 if (ArchType == llvm::Triple::x86) { in getX86TargetFeatures()
2287 static void getTargetFeatures(const ToolChain &TC, const llvm::Triple &Triple, in getTargetFeatures() argument
2292 switch (Triple.getArch()) { in getTargetFeatures()
2295 case llvm::Triple::mips: in getTargetFeatures()
2296 case llvm::Triple::mipsel: in getTargetFeatures()
2297 case llvm::Triple::mips64: in getTargetFeatures()
2298 case llvm::Triple::mips64el: in getTargetFeatures()
2299 getMIPSTargetFeatures(D, Triple, Args, Features); in getTargetFeatures()
2302 case llvm::Triple::arm: in getTargetFeatures()
2303 case llvm::Triple::armeb: in getTargetFeatures()
2304 case llvm::Triple::thumb: in getTargetFeatures()
2305 case llvm::Triple::thumbeb: in getTargetFeatures()
2306 getARMTargetFeatures(TC, Triple, Args, Features, ForAS); in getTargetFeatures()
2309 case llvm::Triple::ppc: in getTargetFeatures()
2310 case llvm::Triple::ppc64: in getTargetFeatures()
2311 case llvm::Triple::ppc64le: in getTargetFeatures()
2312 getPPCTargetFeatures(D, Triple, Args, Features); in getTargetFeatures()
2314 case llvm::Triple::systemz: in getTargetFeatures()
2317 case llvm::Triple::aarch64: in getTargetFeatures()
2318 case llvm::Triple::aarch64_be: in getTargetFeatures()
2321 case llvm::Triple::x86: in getTargetFeatures()
2322 case llvm::Triple::x86_64: in getTargetFeatures()
2323 getX86TargetFeatures(D, Triple, Args, Features); in getTargetFeatures()
2325 case llvm::Triple::hexagon: in getTargetFeatures()
2328 case llvm::Triple::wasm32: in getTargetFeatures()
2329 case llvm::Triple::wasm64: in getTargetFeatures()
2358 const llvm::Triple &Triple) { in shouldUseExceptionTablesForObjCExceptions() argument
2365 if (!Triple.isMacOSX()) in shouldUseExceptionTablesForObjCExceptions()
2368 return (!Triple.isMacOSXVersionLT(10, 5) && in shouldUseExceptionTablesForObjCExceptions()
2369 (Triple.getArch() == llvm::Triple::x86_64 || in shouldUseExceptionTablesForObjCExceptions()
2370 Triple.getArch() == llvm::Triple::arm)); in shouldUseExceptionTablesForObjCExceptions()
2382 const llvm::Triple &Triple = TC.getTriple(); in addExceptionArgs() local
2407 EH |= shouldUseExceptionTablesForObjCExceptions(objcRuntime, Triple); in addExceptionArgs()
2413 bool CXXExceptionsEnabled = Triple.getArch() != llvm::Triple::xcore && in addExceptionArgs()
2414 !Triple.isPS4CPU() && in addExceptionArgs()
2415 !Triple.isWindowsMSVCEnvironment(); in addExceptionArgs()
2425 if (Triple.isPS4CPU()) { in addExceptionArgs()
2603 case llvm::Triple::mips: in CollectArgsForIntegratedAssembler()
2604 case llvm::Triple::mipsel: in CollectArgsForIntegratedAssembler()
2605 case llvm::Triple::mips64: in CollectArgsForIntegratedAssembler()
2606 case llvm::Triple::mips64el: in CollectArgsForIntegratedAssembler()
2788 if (TC.getTriple().getOS() != llvm::Triple::FreeBSD) in linkSanitizerRuntimeDeps()
2877 const llvm::Triple &Triple) { in shouldUseFramePointerForTarget() argument
2878 switch (Triple.getArch()) { in shouldUseFramePointerForTarget()
2879 case llvm::Triple::xcore: in shouldUseFramePointerForTarget()
2880 case llvm::Triple::wasm32: in shouldUseFramePointerForTarget()
2881 case llvm::Triple::wasm64: in shouldUseFramePointerForTarget()
2889 if (Triple.isOSLinux()) { in shouldUseFramePointerForTarget()
2890 switch (Triple.getArch()) { in shouldUseFramePointerForTarget()
2892 case llvm::Triple::mips64: in shouldUseFramePointerForTarget()
2893 case llvm::Triple::mips64el: in shouldUseFramePointerForTarget()
2894 case llvm::Triple::mips: in shouldUseFramePointerForTarget()
2895 case llvm::Triple::mipsel: in shouldUseFramePointerForTarget()
2896 case llvm::Triple::systemz: in shouldUseFramePointerForTarget()
2897 case llvm::Triple::x86: in shouldUseFramePointerForTarget()
2898 case llvm::Triple::x86_64: in shouldUseFramePointerForTarget()
2905 if (Triple.isOSWindows()) { in shouldUseFramePointerForTarget()
2906 switch (Triple.getArch()) { in shouldUseFramePointerForTarget()
2907 case llvm::Triple::x86: in shouldUseFramePointerForTarget()
2909 case llvm::Triple::arm: in shouldUseFramePointerForTarget()
2910 case llvm::Triple::thumb: in shouldUseFramePointerForTarget()
2924 const llvm::Triple &Triple) { in shouldUseFramePointer() argument
2931 return shouldUseFramePointerForTarget(Args, Triple); in shouldUseFramePointer()
2935 const llvm::Triple &Triple) { in shouldUseLeafFramePointer() argument
2942 if (Triple.isPS4CPU()) in shouldUseLeafFramePointer()
2945 return shouldUseFramePointerForTarget(Args, Triple); in shouldUseLeafFramePointer()
3102 const llvm::Triple &Triple, in getMSVCVersion() argument
3139 Triple.getEnvironmentVersion(Major, Minor, Micro); in getMSVCVersion()
3266 ParsePICArgs(const ToolChain &ToolChain, const llvm::Triple &Triple, in ParsePICArgs() argument
3283 case llvm::Triple::arm: in ParsePICArgs()
3284 case llvm::Triple::armeb: in ParsePICArgs()
3285 case llvm::Triple::thumb: in ParsePICArgs()
3286 case llvm::Triple::thumbeb: in ParsePICArgs()
3287 case llvm::Triple::aarch64: in ParsePICArgs()
3288 case llvm::Triple::mips: in ParsePICArgs()
3289 case llvm::Triple::mipsel: in ParsePICArgs()
3290 case llvm::Triple::mips64: in ParsePICArgs()
3291 case llvm::Triple::mips64el: in ParsePICArgs()
3295 case llvm::Triple::x86: in ParsePICArgs()
3296 case llvm::Triple::x86_64: in ParsePICArgs()
3307 if (ToolChain.getTriple().getOS() == llvm::Triple::OpenBSD) { in ParsePICArgs()
3309 case llvm::Triple::mips64: in ParsePICArgs()
3310 case llvm::Triple::mips64el: in ParsePICArgs()
3311 case llvm::Triple::sparcel: in ParsePICArgs()
3312 case llvm::Triple::x86: in ParsePICArgs()
3313 case llvm::Triple::x86_64: in ParsePICArgs()
3317 case llvm::Triple::ppc: in ParsePICArgs()
3318 case llvm::Triple::sparc: in ParsePICArgs()
3319 case llvm::Triple::sparcv9: in ParsePICArgs()
3350 if (Triple.isPS4CPU()) { in ParsePICArgs()
3366 if (PIC && (ToolChain.getTriple().isOSDarwin() || Triple.isPS4CPU())) in ParsePICArgs()
3371 if (KernelOrKext && ((!Triple.isiOS() || Triple.isOSVersionLT(6)) && in ParsePICArgs()
3372 !Triple.isWatchOS())) in ParsePICArgs()
3428 const llvm::Triple Triple(TripleStr); in ConstructJob() local
3478 if (Triple.isOSWindows() && (Triple.getArch() == llvm::Triple::arm || in ConstructJob()
3479 Triple.getArch() == llvm::Triple::thumb)) { in ConstructJob()
3480 unsigned Offset = Triple.getArch() == llvm::Triple::arm ? 4 : 6; in ConstructJob()
3482 Triple.getArchName().substr(Offset).getAsInteger(10, Version); in ConstructJob()
3484 D.Diag(diag::err_target_unsupported_arch) << Triple.getArchName() in ConstructJob()
3611 if (getToolChain().getTriple().getVendor() == llvm::Triple::Apple) in ConstructJob()
3657 ParsePICArgs(getToolChain(), Triple, Args); in ConstructJob()
3716 if (getToolChain().getArch() != llvm::Triple::x86) { in ConstructJob()
3968 std::string CPU = getCPUName(Args, Triple, /*FromAs*/ false); in ConstructJob()
3980 getTargetFeatures(getToolChain(), Triple, Args, CmdArgs, false); in ConstructJob()
3987 case llvm::Triple::arm: in ConstructJob()
3988 case llvm::Triple::armeb: in ConstructJob()
3989 case llvm::Triple::thumb: in ConstructJob()
3990 case llvm::Triple::thumbeb: in ConstructJob()
3992 AddARMTargetArgs(Triple, Args, CmdArgs, KernelOrKext); in ConstructJob()
3995 case llvm::Triple::aarch64: in ConstructJob()
3996 case llvm::Triple::aarch64_be: in ConstructJob()
4000 case llvm::Triple::mips: in ConstructJob()
4001 case llvm::Triple::mipsel: in ConstructJob()
4002 case llvm::Triple::mips64: in ConstructJob()
4003 case llvm::Triple::mips64el: in ConstructJob()
4007 case llvm::Triple::ppc: in ConstructJob()
4008 case llvm::Triple::ppc64: in ConstructJob()
4009 case llvm::Triple::ppc64le: in ConstructJob()
4013 case llvm::Triple::sparc: in ConstructJob()
4014 case llvm::Triple::sparcel: in ConstructJob()
4015 case llvm::Triple::sparcv9: in ConstructJob()
4019 case llvm::Triple::x86: in ConstructJob()
4020 case llvm::Triple::x86_64: in ConstructJob()
4024 case llvm::Triple::hexagon: in ConstructJob()
4064 getToolChain().getArch() == llvm::Triple::x86) { in ConstructJob()
4189 bool UseSeparateSections = Triple.getOS() == llvm::Triple::CloudABI; in ConstructJob()
4548 bool EmulatedTLSDefault = Triple.isAndroid(); in ConstructJob()
4591 const llvm::Triple::ArchType Arch = getToolChain().getArch(); in ConstructJob()
4592 if (!(Arch == llvm::Triple::ppc || Arch == llvm::Triple::ppc64 || in ConstructJob()
4593 Arch == llvm::Triple::ppc64le)) in ConstructJob()
4712 case llvm::Triple::aarch64: in ConstructJob()
4713 case llvm::Triple::aarch64_be: in ConstructJob()
4714 case llvm::Triple::arm: in ConstructJob()
4715 case llvm::Triple::armeb: in ConstructJob()
4716 case llvm::Triple::thumb: in ConstructJob()
4717 case llvm::Triple::thumbeb: in ConstructJob()
4734 } else if (Triple.isOSWindows() && in ConstructJob()
4735 (Triple.getArch() == llvm::Triple::arm || in ConstructJob()
4736 Triple.getArch() == llvm::Triple::thumb)) { in ConstructJob()
4918 getToolChain().getArch() == llvm::Triple::hexagon)) in ConstructJob()
4937 getToolChain().getTriple().getOS() != llvm::Triple::Solaris && in ConstructJob()
4938 getToolChain().getArch() != llvm::Triple::hexagon && in ConstructJob()
4939 getToolChain().getArch() != llvm::Triple::xcore && in ConstructJob()
4941 llvm::Triple::MipsTechnologies) || in ConstructJob()
5041 if (getToolChain().getArch() == llvm::Triple::x86 && in ConstructJob()
5372 if (getToolChain().getArch() == llvm::Triple::le32) { in ConstructJob()
5381 (getToolChain().getArch() == llvm::Triple::arm || in ConstructJob()
5382 getToolChain().getArch() == llvm::Triple::thumb)) { in ConstructJob()
5815 if (getToolChain().getArch() == llvm::Triple::x86_64 || in AddClangCLArgs()
5816 getToolChain().getArch() == llvm::Triple::x86) in AddClangCLArgs()
5875 const llvm::Triple &Triple = getToolChain().getTriple(); in AddMIPSTargetArgs() local
5876 mips::getMipsCPUAndABI(Args, Triple, CPUName, ABIName); in AddMIPSTargetArgs()
5893 const llvm::Triple Triple(TripleStr); in ConstructJob() local
5922 std::string CPU = getCPUName(Args, Triple, /*FromAs*/ true); in ConstructJob()
5929 getTargetFeatures(getToolChain(), Triple, Args, CmdArgs, true); in ConstructJob()
5982 ParsePICArgs(getToolChain(), Triple, Args); in ConstructJob()
6017 case llvm::Triple::mips: in ConstructJob()
6018 case llvm::Triple::mipsel: in ConstructJob()
6019 case llvm::Triple::mips64: in ConstructJob()
6020 case llvm::Triple::mips64el: in ConstructJob()
6104 case llvm::Triple::x86: in ConstructJob()
6105 case llvm::Triple::ppc: in ConstructJob()
6108 case llvm::Triple::x86_64: in ConstructJob()
6109 case llvm::Triple::ppc64: in ConstructJob()
6110 case llvm::Triple::ppc64le: in ConstructJob()
6113 case llvm::Triple::sparcel: in ConstructJob()
6525 const std::string arm::getARMArch(StringRef Arch, const llvm::Triple &Triple) { in getARMArch() argument
6530 MArch = Triple.getArchName(); in getARMArch()
6538 StringRef Suffix = arm::getLLVMArchSuffixForARM(CPU, MArch, Triple); in getARMArch()
6552 StringRef arm::getARMCPUForMArch(StringRef Arch, const llvm::Triple &Triple) { in getARMCPUForMArch() argument
6553 std::string MArch = getARMArch(Arch, Triple); in getARMCPUForMArch()
6561 return Triple.getARMCPUForArch(MArch); in getARMCPUForMArch()
6566 const llvm::Triple &Triple) { in getARMTargetCPU() argument
6578 return getARMCPUForMArch(Arch, Triple); in getARMTargetCPU()
6585 const llvm::Triple &Triple) { in getLLVMArchSuffixForARM() argument
6588 std::string ARMArch = tools::arm::getARMArch(Arch, Triple); in getLLVMArchSuffixForARM()
6593 ArchKind = llvm::ARM::parseCPUArch(Triple.getARMCPUForArch(ARMArch)); in getLLVMArchSuffixForARM()
6607 const llvm::Triple &Triple) { in appendEBLinkFlags() argument
6613 if (getARMSubArchVersionNumber(Triple) >= 7 || isARMMProfile(Triple)) in appendEBLinkFlags()
6650 bool mips::isNaN2008(const ArgList &Args, const llvm::Triple &Triple) { in isNaN2008() argument
6658 return llvm::StringSwitch<bool>(getCPUName(Args, Triple)) in isNaN2008()
6665 bool mips::isFPXXDefault(const llvm::Triple &Triple, StringRef CPUName, in isFPXXDefault() argument
6667 if (Triple.getVendor() != llvm::Triple::ImaginationTechnologies && in isFPXXDefault()
6668 Triple.getVendor() != llvm::Triple::MipsTechnologies) in isFPXXDefault()
6686 bool mips::shouldUseFPXX(const ArgList &Args, const llvm::Triple &Triple, in shouldUseFPXX() argument
6689 bool UseFPXX = isFPXXDefault(Triple, CPUName, ABIName, FloatABI); in shouldUseFPXX()
6700 llvm::Triple::ArchType darwin::getArchTypeForMachOArchName(StringRef Str) { in getArchTypeForMachOArchName()
6713 return llvm::StringSwitch<llvm::Triple::ArchType>(Str) in getArchTypeForMachOArchName()
6714 .Cases("ppc", "ppc601", "ppc603", "ppc604", "ppc604e", llvm::Triple::ppc) in getArchTypeForMachOArchName()
6715 .Cases("ppc750", "ppc7400", "ppc7450", "ppc970", llvm::Triple::ppc) in getArchTypeForMachOArchName()
6716 .Case("ppc64", llvm::Triple::ppc64) in getArchTypeForMachOArchName()
6717 .Cases("i386", "i486", "i486SX", "i586", "i686", llvm::Triple::x86) in getArchTypeForMachOArchName()
6719 llvm::Triple::x86) in getArchTypeForMachOArchName()
6720 .Cases("x86_64", "x86_64h", llvm::Triple::x86_64) in getArchTypeForMachOArchName()
6722 .Cases("arm", "armv4t", "armv5", "armv6", "armv6m", llvm::Triple::arm) in getArchTypeForMachOArchName()
6723 .Cases("armv7", "armv7em", "armv7k", "armv7m", llvm::Triple::arm) in getArchTypeForMachOArchName()
6724 .Cases("armv7s", "xscale", llvm::Triple::arm) in getArchTypeForMachOArchName()
6725 .Case("arm64", llvm::Triple::aarch64) in getArchTypeForMachOArchName()
6726 .Case("r600", llvm::Triple::r600) in getArchTypeForMachOArchName()
6727 .Case("amdgcn", llvm::Triple::amdgcn) in getArchTypeForMachOArchName()
6728 .Case("nvptx", llvm::Triple::nvptx) in getArchTypeForMachOArchName()
6729 .Case("nvptx64", llvm::Triple::nvptx64) in getArchTypeForMachOArchName()
6730 .Case("amdil", llvm::Triple::amdil) in getArchTypeForMachOArchName()
6731 .Case("spir", llvm::Triple::spir) in getArchTypeForMachOArchName()
6732 .Default(llvm::Triple::UnknownArch); in getArchTypeForMachOArchName()
6735 void darwin::setTripleTypeForMachOArchName(llvm::Triple &T, StringRef Str) { in setTripleTypeForMachOArchName()
6736 const llvm::Triple::ArchType Arch = getArchTypeForMachOArchName(Str); in setTripleTypeForMachOArchName()
6742 T.setOS(llvm::Triple::UnknownOS); in setTripleTypeForMachOArchName()
6743 T.setObjectFormat(llvm::Triple::MachO); in setTripleTypeForMachOArchName()
6861 const llvm::Triple &T(getToolChain().getTriple()); in ConstructJob()
6879 if (getToolChain().getArch() == llvm::Triple::x86 || in ConstructJob()
6880 getToolChain().getArch() == llvm::Triple::x86_64 || in ConstructJob()
6884 if (getToolChain().getArch() != llvm::Triple::x86_64 && in ConstructJob()
7444 case llvm::Triple::x86: in ConstructJob()
7450 case llvm::Triple::ppc: in ConstructJob()
7455 case llvm::Triple::sparc: in ConstructJob()
7456 case llvm::Triple::sparcel: { in ConstructJob()
7464 case llvm::Triple::sparcv9: { in ConstructJob()
7472 case llvm::Triple::mips64: in ConstructJob()
7473 case llvm::Triple::mips64el: { in ConstructJob()
7481 if (getToolChain().getArch() == llvm::Triple::mips64) in ConstructJob()
7522 if (getToolChain().getArch() == llvm::Triple::mips64) in ConstructJob()
7524 else if (getToolChain().getArch() == llvm::Triple::mips64el) in ConstructJob()
7573 std::string Triple = getToolChain().getTripleString(); in ConstructJob() local
7574 if (Triple.substr(0, 6) == "x86_64") in ConstructJob()
7575 Triple.replace(0, 6, "amd64"); in ConstructJob()
7577 Args.MakeArgString("-L/usr/lib/gcc-lib/" + Triple + "/4.2.1")); in ConstructJob()
7729 case llvm::Triple::arm: in ConstructJob()
7732 case llvm::Triple::x86: in ConstructJob()
7735 case llvm::Triple::x86_64: in ConstructJob()
7770 case llvm::Triple::x86: in ConstructJob()
7773 case llvm::Triple::ppc: in ConstructJob()
7776 case llvm::Triple::mips: in ConstructJob()
7777 case llvm::Triple::mipsel: in ConstructJob()
7778 case llvm::Triple::mips64: in ConstructJob()
7779 case llvm::Triple::mips64el: { in ConstructJob()
7790 if (getToolChain().getArch() == llvm::Triple::mips || in ConstructJob()
7791 getToolChain().getArch() == llvm::Triple::mips64) in ConstructJob()
7799 case llvm::Triple::arm: in ConstructJob()
7800 case llvm::Triple::armeb: in ConstructJob()
7801 case llvm::Triple::thumb: in ConstructJob()
7802 case llvm::Triple::thumbeb: { in ConstructJob()
7811 case llvm::Triple::GNUEABIHF: in ConstructJob()
7812 case llvm::Triple::GNUEABI: in ConstructJob()
7813 case llvm::Triple::EABI: in ConstructJob()
7822 case llvm::Triple::sparc: in ConstructJob()
7823 case llvm::Triple::sparcel: in ConstructJob()
7824 case llvm::Triple::sparcv9: { in ConstructJob()
7852 const llvm::Triple::ArchType Arch = ToolChain.getArch(); in ConstructJob()
7885 if (Arch == llvm::Triple::arm || Arch == llvm::Triple::sparc || in ConstructJob()
7886 Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) { in ConstructJob()
7895 if (Arch == llvm::Triple::x86) { in ConstructJob()
7900 if (Arch == llvm::Triple::ppc) { in ConstructJob()
8034 case llvm::Triple::x86: in ConstructJob()
8037 case llvm::Triple::arm: in ConstructJob()
8038 case llvm::Triple::armeb: in ConstructJob()
8039 case llvm::Triple::thumb: in ConstructJob()
8040 case llvm::Triple::thumbeb: { in ConstructJob()
8049 case llvm::Triple::mips: in ConstructJob()
8050 case llvm::Triple::mipsel: in ConstructJob()
8051 case llvm::Triple::mips64: in ConstructJob()
8052 case llvm::Triple::mips64el: { in ConstructJob()
8063 if (getToolChain().getArch() == llvm::Triple::mips || in ConstructJob()
8064 getToolChain().getArch() == llvm::Triple::mips64) in ConstructJob()
8073 case llvm::Triple::sparc: in ConstructJob()
8074 case llvm::Triple::sparcel: { in ConstructJob()
8082 case llvm::Triple::sparcv9: { in ConstructJob()
8134 case llvm::Triple::x86: in ConstructJob()
8138 case llvm::Triple::arm: in ConstructJob()
8139 case llvm::Triple::thumb: in ConstructJob()
8142 case llvm::Triple::EABI: in ConstructJob()
8143 case llvm::Triple::GNUEABI: in ConstructJob()
8146 case llvm::Triple::EABIHF: in ConstructJob()
8147 case llvm::Triple::GNUEABIHF: in ConstructJob()
8155 case llvm::Triple::armeb: in ConstructJob()
8156 case llvm::Triple::thumbeb: in ConstructJob()
8159 llvm::Triple(getToolChain().ComputeEffectiveClangTriple(Args))); in ConstructJob()
8162 case llvm::Triple::EABI: in ConstructJob()
8163 case llvm::Triple::GNUEABI: in ConstructJob()
8166 case llvm::Triple::EABIHF: in ConstructJob()
8167 case llvm::Triple::GNUEABIHF: in ConstructJob()
8175 case llvm::Triple::mips64: in ConstructJob()
8176 case llvm::Triple::mips64el: in ConstructJob()
8179 if (getToolChain().getArch() == llvm::Triple::mips64) in ConstructJob()
8185 if (getToolChain().getArch() == llvm::Triple::mips64) in ConstructJob()
8191 case llvm::Triple::ppc: in ConstructJob()
8196 case llvm::Triple::ppc64: in ConstructJob()
8197 case llvm::Triple::ppc64le: in ConstructJob()
8202 case llvm::Triple::sparc: in ConstructJob()
8207 case llvm::Triple::sparcv9: in ConstructJob()
8254 case llvm::Triple::aarch64: in ConstructJob()
8255 case llvm::Triple::arm: in ConstructJob()
8256 case llvm::Triple::armeb: in ConstructJob()
8257 case llvm::Triple::thumb: in ConstructJob()
8258 case llvm::Triple::thumbeb: in ConstructJob()
8259 case llvm::Triple::ppc: in ConstructJob()
8260 case llvm::Triple::ppc64: in ConstructJob()
8261 case llvm::Triple::ppc64le: in ConstructJob()
8262 case llvm::Triple::x86: in ConstructJob()
8263 case llvm::Triple::x86_64: in ConstructJob()
8322 llvm::Triple Triple = llvm::Triple(TripleStr); in ConstructJob() local
8330 ParsePICArgs(getToolChain(), Triple, Args); in ConstructJob()
8337 case llvm::Triple::x86: in ConstructJob()
8340 case llvm::Triple::x86_64: in ConstructJob()
8341 if (getToolChain().getTriple().getEnvironment() == llvm::Triple::GNUX32) in ConstructJob()
8346 case llvm::Triple::ppc: in ConstructJob()
8351 case llvm::Triple::ppc64: in ConstructJob()
8356 case llvm::Triple::ppc64le: in ConstructJob()
8362 case llvm::Triple::sparc: in ConstructJob()
8363 case llvm::Triple::sparcel: { in ConstructJob()
8370 case llvm::Triple::sparcv9: { in ConstructJob()
8377 case llvm::Triple::arm: in ConstructJob()
8378 case llvm::Triple::armeb: in ConstructJob()
8379 case llvm::Triple::thumb: in ConstructJob()
8380 case llvm::Triple::thumbeb: { in ConstructJob()
8381 const llvm::Triple &Triple2 = getToolChain().getTriple(); in ConstructJob()
8383 case llvm::Triple::ARMSubArch_v7: in ConstructJob()
8386 case llvm::Triple::ARMSubArch_v8: in ConstructJob()
8420 case llvm::Triple::mips: in ConstructJob()
8421 case llvm::Triple::mipsel: in ConstructJob()
8422 case llvm::Triple::mips64: in ConstructJob()
8423 case llvm::Triple::mips64el: { in ConstructJob()
8444 if (getToolChain().getArch() == llvm::Triple::mips || in ConstructJob()
8445 getToolChain().getArch() == llvm::Triple::mips64) in ConstructJob()
8502 case llvm::Triple::systemz: { in ConstructJob()
8532 static void AddLibgcc(const llvm::Triple &Triple, const Driver &D, in AddLibgcc() argument
8534 bool isAndroid = Triple.isAndroid(); in AddLibgcc()
8535 bool isCygMing = Triple.isOSCygMing(); in AddLibgcc()
8568 const llvm::Triple::ArchType Arch = ToolChain.getArch(); in getLinuxDynamicLinker()
8575 } else if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::sparc || in getLinuxDynamicLinker()
8576 Arch == llvm::Triple::sparcel) in getLinuxDynamicLinker()
8578 else if (Arch == llvm::Triple::aarch64) in getLinuxDynamicLinker()
8580 else if (Arch == llvm::Triple::aarch64_be) in getLinuxDynamicLinker()
8582 else if (Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb) { in getLinuxDynamicLinker()
8583 if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF || in getLinuxDynamicLinker()
8588 } else if (Arch == llvm::Triple::armeb || Arch == llvm::Triple::thumbeb) { in getLinuxDynamicLinker()
8590 if (ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUEABIHF || in getLinuxDynamicLinker()
8595 } else if (Arch == llvm::Triple::mips || Arch == llvm::Triple::mipsel || in getLinuxDynamicLinker()
8596 Arch == llvm::Triple::mips64 || Arch == llvm::Triple::mips64el) { in getLinuxDynamicLinker()
8604 bool LE = (ToolChain.getTriple().getArch() == llvm::Triple::mipsel) || in getLinuxDynamicLinker()
8605 (ToolChain.getTriple().getArch() == llvm::Triple::mips64el); in getLinuxDynamicLinker()
8611 } else if (Arch == llvm::Triple::ppc) in getLinuxDynamicLinker()
8613 else if (Arch == llvm::Triple::ppc64) { in getLinuxDynamicLinker()
8617 } else if (Arch == llvm::Triple::ppc64le) { in getLinuxDynamicLinker()
8621 } else if (Arch == llvm::Triple::systemz) in getLinuxDynamicLinker()
8623 else if (Arch == llvm::Triple::sparcv9) in getLinuxDynamicLinker()
8625 else if (Arch == llvm::Triple::x86_64 && in getLinuxDynamicLinker()
8626 ToolChain.getTriple().getEnvironment() == llvm::Triple::GNUX32) in getLinuxDynamicLinker()
8642 case llvm::Triple::Win32: in AddRunTimeLibs()
8643 case llvm::Triple::Linux: in AddRunTimeLibs()
8654 static const char *getLDMOption(const llvm::Triple &T, const ArgList &Args) { in getLDMOption()
8656 case llvm::Triple::x86: in getLDMOption()
8658 case llvm::Triple::aarch64: in getLDMOption()
8660 case llvm::Triple::aarch64_be: in getLDMOption()
8662 case llvm::Triple::arm: in getLDMOption()
8663 case llvm::Triple::thumb: in getLDMOption()
8665 case llvm::Triple::armeb: in getLDMOption()
8666 case llvm::Triple::thumbeb: in getLDMOption()
8668 case llvm::Triple::ppc: in getLDMOption()
8670 case llvm::Triple::ppc64: in getLDMOption()
8672 case llvm::Triple::ppc64le: in getLDMOption()
8674 case llvm::Triple::sparc: in getLDMOption()
8675 case llvm::Triple::sparcel: in getLDMOption()
8677 case llvm::Triple::sparcv9: in getLDMOption()
8679 case llvm::Triple::mips: in getLDMOption()
8681 case llvm::Triple::mipsel: in getLDMOption()
8683 case llvm::Triple::mips64: in getLDMOption()
8687 case llvm::Triple::mips64el: in getLDMOption()
8691 case llvm::Triple::systemz: in getLDMOption()
8693 case llvm::Triple::x86_64: in getLDMOption()
8694 if (T.getEnvironment() == llvm::Triple::GNUX32) in getLDMOption()
8712 llvm::Triple Triple = llvm::Triple(TripleStr); in ConstructJob() local
8714 const llvm::Triple::ArchType Arch = ToolChain.getArch(); in ConstructJob()
8721 (ToolChain.getTriple().getVendor() != llvm::Triple::MipsTechnologies); in ConstructJob()
8753 if (Arch == llvm::Triple::armeb || Arch == llvm::Triple::thumbeb) in ConstructJob()
8754 arm::appendEBLinkFlags(Args, CmdArgs, Triple); in ConstructJob()
8767 if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb || in ConstructJob()
8768 Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb) in ConstructJob()
8776 if (Arch == llvm::Triple::arm || Arch == llvm::Triple::armeb || in ConstructJob()
8777 Arch == llvm::Triple::thumb || Arch == llvm::Triple::thumbeb || in ConstructJob()
8955 const llvm::Triple::ArchType Arch = ToolChain.getArch(); in ConstructJob()
8986 if (Arch == llvm::Triple::x86) in ConstructJob()
8988 else if (Arch == llvm::Triple::arm) in ConstructJob()
8990 else if (Arch == llvm::Triple::x86_64) in ConstructJob()
8992 else if (Arch == llvm::Triple::mipsel) in ConstructJob()
9055 if (getToolChain().getArch() == llvm::Triple::mipsel) in ConstructJob()
9072 if (getToolChain().getArch() == llvm::Triple::mipsel) in ConstructJob()
9179 if (getToolChain().getArch() == llvm::Triple::x86) in ConstructJob()
9223 if (getToolChain().getArch() == llvm::Triple::x86) { in ConstructJob()
9383 case llvm::Triple::x86: in ConstructJob()
9386 case llvm::Triple::x86_64: in ConstructJob()
9389 case llvm::Triple::arm: in ConstructJob()
9636 if (getToolChain().getArch() == llvm::Triple::x86) { in ConstructJob()
9638 } else if (getToolChain().getArch() == llvm::Triple::x86_64) { in ConstructJob()
9722 if (TC.getArch() == llvm::Triple::x86) in ConstructJob()
9724 if (TC.getArch() == llvm::Triple::x86_64) in ConstructJob()
9726 if (TC.getArch() == llvm::Triple::arm) in ConstructJob()
9747 if (TC.getArch() == llvm::Triple::x86) in ConstructJob()
9926 case llvm::Triple::arm: in ConstructJob()
9927 case llvm::Triple::thumb: in ConstructJob()
9929 case llvm::Triple::x86: in ConstructJob()
9932 case llvm::Triple::x86_64: in ConstructJob()
9958 const llvm::Triple &T = TC.getTriple(); in ConstructJob()
9986 case llvm::Triple::arm: in ConstructJob()
9987 case llvm::Triple::thumb: in ConstructJob()
9991 case llvm::Triple::x86: in ConstructJob()
9995 case llvm::Triple::x86_64: in ConstructJob()
10004 case llvm::Triple::arm: in ConstructJob()
10005 case llvm::Triple::thumb: in ConstructJob()
10006 case llvm::Triple::x86_64: in ConstructJob()
10009 case llvm::Triple::x86: in ConstructJob()
10091 CmdArgs.push_back(Args.MakeArgString(TC.getArch() == llvm::Triple::x86 in ConstructJob()
10198 const llvm::Triple &T = TC.getTriple(); in ConstructJob()
10205 if (T.getArch() == llvm::Triple::sparc) in ConstructJob()
10243 if (T.getOS() == llvm::Triple::RTEMS) { in ConstructJob()