1060 const llvm::Triple &lhs_triple =
GetTriple();
1061 const llvm::Triple &rhs_triple = rhs.
GetTriple();
1066 if (lhs_triple.getArch() == llvm::Triple::amdgpu &&
1067 rhs_triple.getArch() == llvm::Triple::amdgpu) {
1068 llvm::Triple rhs_arch = lhs_triple;
1069 rhs_arch.setArch(rhs_triple.getArch(), rhs_triple.getSubArch());
1070 bool sub_arches_match =
1071 match ==
ExactMatch ? lhs_triple.getSubArch() == rhs_triple.getSubArch()
1072 : lhs_triple.isCompatibleWith(rhs_arch);
1073 if (!sub_arches_match)
1077 const llvm::Triple::VendorType lhs_triple_vendor = lhs_triple.getVendor();
1078 const llvm::Triple::VendorType rhs_triple_vendor = rhs_triple.getVendor();
1080 const llvm::Triple::OSType lhs_triple_os = lhs_triple.getOS();
1081 const llvm::Triple::OSType rhs_triple_os = rhs_triple.getOS();
1083 bool both_windows = lhs_triple.isOSWindows() && rhs_triple.isOSWindows();
1087 if ((lhs_triple_vendor != rhs_triple_vendor) &&
1093 if (rhs_vendor_specified && lhs_vendor_specified)
1097 if (lhs_triple_vendor != llvm::Triple::UnknownVendor &&
1098 rhs_triple_vendor != llvm::Triple::UnknownVendor)
1102 const llvm::Triple::EnvironmentType lhs_triple_env =
1103 lhs_triple.getEnvironment();
1104 const llvm::Triple::EnvironmentType rhs_triple_env =
1105 rhs_triple.getEnvironment();
1109 if ((lhs_triple_os == llvm::Triple::IOS &&
1110 lhs_triple_env == llvm::Triple::MacABI &&
1111 rhs_triple_os == llvm::Triple::MacOSX) ||
1112 (lhs_triple_os == llvm::Triple::MacOSX &&
1113 rhs_triple_os == llvm::Triple::IOS &&
1114 rhs_triple_env == llvm::Triple::MacABI))
1117 if ((lhs_triple_os == llvm::Triple::DriverKit &&
1118 rhs_triple_os == llvm::Triple::MacOSX) ||
1119 (lhs_triple_os == llvm::Triple::MacOSX &&
1120 rhs_triple_os == llvm::Triple::DriverKit))
1125 if (lhs_triple_os == llvm::Triple::IOS &&
1126 rhs_triple_os == llvm::Triple::IOS &&
1127 (lhs_triple_env == llvm::Triple::MacABI ||
1128 rhs_triple_env == llvm::Triple::MacABI) &&
1129 lhs_triple_env != rhs_triple_env)
1132 if (lhs_triple_os != rhs_triple_os) {
1136 if (lhs_os_specified && rhs_os_specified)
1141 ((!lhs_os_specified && !lhs_triple.hasEnvironment()) ||
1142 (!rhs_os_specified && !rhs_triple.hasEnvironment())))