Lines Matching refs:Components
347 // Parse into components.
348 SmallVector<StringRef, 4> Components;
349 Str.split(Components, "-");
357 if (Components.size() > 0)
358 Arch = parseArch(Components[0]);
360 if (Components.size() > 1)
361 Vendor = parseVendor(Components[1]);
363 if (Components.size() > 2)
364 OS = parseOS(Components[2]);
366 if (Components.size() > 3)
367 Environment = parseEnvironment(Components[3]);
369 // Note which components are already in their final position. These will not
377 // If they are not there already, permute the components into their canonical
384 for (unsigned Idx = 0; Idx != Components.size(); ++Idx) {
385 // Do not reparse any components that already matched.
391 StringRef Comp = Components[Idx];
415 // components that are in the way to the right. This tends to give
419 // Insert left, pushing the existing components to the right. For
423 std::swap(CurrentComponent, Components[Idx]);
425 // components to the right.
427 // Skip over any fixed components.
432 std::swap(CurrentComponent, Components[i]);
435 // Push right by inserting empty components until the component at Idx
441 for (unsigned i = Idx; i < Components.size();) {
444 std::swap(CurrentComponent, Components[i]);
448 // Advance to the next component, skipping any fixed components.
454 Components.push_back(CurrentComponent);
461 assert(Pos < Components.size() && Components[Pos] == Comp &&
469 // correct values for the computed components.
471 // Stick the corrected components back together to form the normalized string.
473 for (unsigned i = 0, e = Components.size(); i != e; ++i) {
475 Normalized += Components[i];
533 // Parse up to three components.
534 unsigned *Components[3] = { &Major, &Minor, &Micro };
540 *Components[i] = EatNumber(OSName);