Triple

Helper for working with target triples.

Triple.swift:46
@dynamicMemberLookup struct Triple

Target triples are strings in the canonical form: ARCHITECTURE-VENDOR-OPERATING_SYSTEM or ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT

This type is used for clients which want to support arbitrary configuration names, but also want to implement certain special behavior for particular configurations. This class isolates the mapping from the components of the configuration name to well known IDs.

At its core the Triple class is designed to be a wrapper for a triple string; the constructor does not change or normalize the triple string. Clients that need to handle the non-canonical triples that users often specify should use the normalize method.

See autoconf/config.guess for a glimpse into what target triples look like in practice.

This is a port of https://github.com/apple/swift-llvm/blob/stable/include/llvm/ADT/Triple.h