Lines Matching defs:T
15 static MachO::CPUSubTypeX86 getX86SubType(const Triple &T) {
16 assert(T.isX86());
17 if (T.isArch32Bit())
20 assert(T.isArch64Bit());
21 if (T.getArchName() == "x86_64h")
26 static MachO::CPUSubTypeARM getARMSubType(const Triple &T) {
27 assert(T.isARM() || T.isThumb());
28 StringRef Arch = T.getArchName();
57 static MachO::CPUSubTypeARM64 getARM64SubType(const Triple &T) {
58 assert(T.isAArch64());
59 if (T.isArch32Bit())
61 if (T.isArm64e())
67 static MachO::CPUSubTypePowerPC getPowerPCSubType(const Triple &T) {
71 static Error unsupported(const char *Str, const Triple &T) {
74 T.str().c_str());
77 Expected<uint32_t> MachO::getCPUType(const Triple &T) {
78 if (!T.isOSBinFormatMachO())
79 return unsupported("type", T);
80 if (T.isX86() && T.isArch32Bit())
82 if (T.isX86() && T.isArch64Bit())
84 if (T.isARM() || T.isThumb())
86 if (T.isAArch64())
87 return T.isArch32Bit() ? MachO::CPU_TYPE_ARM64_32 : MachO::CPU_TYPE_ARM64;
88 if (T.getArch() == Triple::ppc)
90 if (T.getArch() == Triple::ppc64)
92 return unsupported("type", T);
95 Expected<uint32_t> MachO::getCPUSubType(const Triple &T) {
96 if (!T.isOSBinFormatMachO())
97 return unsupported("subtype", T);
98 if (T.isX86())
99 return getX86SubType(T);
100 if (T.isARM() || T.isThumb())
101 return getARMSubType(T);
102 if (T.isAArch64() || T.getArch() == Triple::aarch64_32)
103 return getARM64SubType(T);
104 if (T.getArch() == Triple::ppc || T.getArch() == Triple::ppc64)
105 return getPowerPCSubType(T);
106 return unsupported("subtype", T);
109 Expected<uint32_t> MachO::getCPUSubType(const Triple &T,
112 Expected<uint32_t> Result = MachO::getCPUSubType(T);