Lines Matching full:components
987 SmallVector<StringRef, 4> Components;
988 StringRef(Data).split(Components, '-', /*MaxSplit*/ 3);
989 if (Components.size() > 0) {
990 Arch = parseArch(Components[0]);
991 SubArch = parseSubArch(Components[0]);
992 if (Components.size() > 1) {
993 Vendor = parseVendor(Components[1]);
994 if (Components.size() > 2) {
995 OS = parseOS(Components[2]);
996 if (Components.size() > 3) {
997 Environment = parseEnvironment(Components[3]);
998 ObjectFormat = parseFormat(Components[3]);
1003 StringSwitch<Triple::EnvironmentType>(Components[0])
1102 // Parse into components.
1103 SmallVector<StringRef, 4> Components;
1104 Str.split(Components, '-');
1112 if (Components.size() > 0)
1113 Arch = parseArch(Components[0]);
1115 if (Components.size() > 1)
1116 Vendor = parseVendor(Components[1]);
1118 if (Components.size() > 2) {
1119 OS = parseOS(Components[2]);
1120 IsCygwin = Components[2].starts_with("cygwin");
1121 IsMinGW32 = Components[2].starts_with("mingw");
1124 if (Components.size() > 3)
1125 Environment = parseEnvironment(Components[3]);
1127 if (Components.size() > 4)
1128 ObjectFormat = parseFormat(Components[4]);
1130 // Note which components are already in their final position. These will not
1138 // If they are not there already, permute the components into their canonical
1145 for (unsigned Idx = 0; Idx != Components.size(); ++Idx) {
1146 // Do not reparse any components that already matched.
1152 StringRef Comp = Components[Idx];
1182 // components that are in the way to the right. This tends to give
1186 // Insert left, pushing the existing components to the right. For
1190 std::swap(CurrentComponent, Components[Idx]);
1192 // components to the right.
1194 // Skip over any fixed components.
1199 std::swap(CurrentComponent, Components[i]);
1202 // Push right by inserting empty components until the component at Idx
1208 for (unsigned i = Idx; i < Components.size();) {
1211 std::swap(CurrentComponent, Components[i]);
1215 // Advance to the next component, skipping any fixed components.
1221 Components.push_back(CurrentComponent);
1228 assert(Pos < Components.size() && Components[Pos] == Comp &&
1236 // as the OS (Components[2]) instead of the vendor (Components[1]).
1238 Components[1] == "none" && Components[2].empty())
1239 std::swap(Components[1], Components[2]);
1241 // Replace empty components with "unknown" value.
1242 for (StringRef &C : Components)
1247 // correct values for the computed components.
1250 Components[3].starts_with("androideabi")) {
1251 StringRef AndroidVersion = Components[3].drop_front(strlen("androideabi"));
1253 Components[3] = "android";
1256 Components[3] = NormalizedEnvironment;
1262 Components[3] = "gnueabihf";
1265 Components.resize(4);
1266 Components[2] = "windows";
1269 Components[3] = "msvc";
1271 Components[3] = getObjectFormatTypeName(ObjectFormat);
1274 Components.resize(4);
1275 Components[2] = "windows";
1276 Components[3] = "gnu";
1278 Components.resize(4);
1279 Components[2] = "windows";
1280 Components[3] = "cygnus";
1285 Components.resize(5);
1286 Components[4] = getObjectFormatTypeName(ObjectFormat);
1295 if (Components[0] == "dxil") {
1296 if (Components.size() > 4) {
1297 Components.resize(4);
1301 Components[0] = getDXILArchNameFromShaderModel(Components[2]);
1304 // Stick the corrected components back together to form the normalized string.
1305 return join(Components, "-");