class Triple

Declaration

class Triple { /* full declaration omitted */ };

Description

Triple - Helper class for working with autoconf configuration names. For historical reasons, we also call these 'triples' (they used to contain exactly three fields). Configuration names are strings in the canonical form: ARCHITECTURE-VENDOR-OPERATING_SYSTEM or ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT This class 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 configuration names look like in practice.

Declared at: llvm/include/llvm/ADT/Triple.h:44

Member Variables

private std::string Data
private llvm::Triple::ArchType Arch = {}
The parsed arch type.
private llvm::Triple::SubArchType SubArch = {}
The parsed subarchitecture type.
private llvm::Triple::VendorType Vendor = {}
The parsed vendor type.
private llvm::Triple::OSType OS = {}
The parsed OS type.
private llvm::Triple::EnvironmentType Environment = {}
The parsed Environment type.
private llvm::Triple::ObjectFormatType ObjectFormat = {}
The object format type.

Method Overview

Methods

Triple(const llvm::Twine& Str)

Declared at: llvm/include/llvm/ADT/Triple.h:311

Parameters

const llvm::Twine& Str

Triple(const llvm::Twine& ArchStr,
       const llvm::Twine& VendorStr,
       const llvm::Twine& OSStr)

Declared at: llvm/include/llvm/ADT/Triple.h:312

Parameters

const llvm::Twine& ArchStr
const llvm::Twine& VendorStr
const llvm::Twine& OSStr

Triple(const llvm::Twine& ArchStr,
       const llvm::Twine& VendorStr,
       const llvm::Twine& OSStr,
       const llvm::Twine& EnvironmentStr)

Declared at: llvm/include/llvm/ADT/Triple.h:313

Parameters

const llvm::Twine& ArchStr
const llvm::Twine& VendorStr
const llvm::Twine& OSStr
const llvm::Twine& EnvironmentStr

Triple()

Description

Default constructor is the same as an empty string and leaves all triple fields unknown.

Declared at: llvm/include/llvm/ADT/Triple.h:309

llvm::Triple get32BitArchVariant() const

Description

Form a triple with a 32-bit variant of the current architecture. This can be used to move across "families" of architectures where useful.

Declared at: llvm/include/llvm/ADT/Triple.h:981

Returns

A new triple with a 32-bit architecture or an unknown architecture if no such variant can be found.

llvm::Triple get64BitArchVariant() const

Description

Form a triple with a 64-bit variant of the current architecture. This can be used to move across "families" of architectures where useful.

Declared at: llvm/include/llvm/ADT/Triple.h:989

Returns

A new triple with a 64-bit architecture or an unknown architecture if no such variant can be found.

llvm::StringRef getARMCPUForArch(
    llvm::StringRef Arch =
        llvm::StringRef()) const

Description

Get the (LLVM) name of the minimum ARM CPU for the arch we are targeting.

Declared at: llvm/include/llvm/ADT/Triple.h:1011

Parameters

llvm::StringRef Arch = llvm::StringRef()
the architecture name (e.g., "armv7s"). If it is an empty string then the triple's arch name is used.

llvm::Triple::ArchType getArch() const

Description

Get the parsed architecture type of this triple.

Declared at: llvm/include/llvm/ADT/Triple.h:345

llvm::StringRef getArchName(
    llvm::Triple::ArchType Kind,
    llvm::Triple::SubArchType SubArch =
        NoSubArch) const

Description

Get the architecture name based on Kind and SubArch.

Declared at: llvm/include/llvm/ADT/Triple.h:412

Parameters

llvm::Triple::ArchType Kind
llvm::Triple::SubArchType SubArch = NoSubArch

llvm::StringRef getArchName() const

Description

Get the architecture (first) component of the triple.

Declared at: llvm/include/llvm/ADT/Triple.h:409

static llvm::Triple::ArchType
getArchTypeForLLVMName(llvm::StringRef Str)

Description

The canonical type for the given LLVM architecture name (e.g., "x86").

Declared at: llvm/include/llvm/ADT/Triple.h:1058

Parameters

llvm::StringRef Str

static llvm::StringRef getArchTypeName(
    llvm::Triple::ArchType Kind)

Description

Get the canonical name for the \p Kind architecture.

Declared at: llvm/include/llvm/ADT/Triple.h:1035

Parameters

llvm::Triple::ArchType Kind

static llvm::StringRef getArchTypePrefix(
    llvm::Triple::ArchType Kind)

Description

Get the "prefix" canonical name for the \p Kind architecture. This is the prefix used by the architecture specific builtins, and is suitable for passing to

Declared at: llvm/include/llvm/ADT/Triple.h:1042

Parameters

llvm::Triple::ArchType Kind

Returns

- The architecture prefix, or 0 if none is defined.

llvm::Triple getBigEndianArchVariant() const

Description

Form a triple with a big endian variant of the current architecture. This can be used to move across "families" of architectures where useful.

Declared at: llvm/include/llvm/ADT/Triple.h:997

Returns

A new triple with a big endian architecture or an unknown architecture if no such variant can be found.

static llvm::VersionTuple
getCanonicalVersionForOS(
    llvm::Triple::OSType OSKind,
    const llvm::VersionTuple& Version)

Description

Returns a canonicalized OS version number for the specified OS.

Declared at: llvm/include/llvm/ADT/Triple.h:1063

Parameters

llvm::Triple::OSType OSKind
const llvm::VersionTuple& Version

llvm::VersionTuple getDriverKitVersion() const

Description

Parse the version number as with getOSVersion.

Declared at: llvm/include/llvm/ADT/Triple.h:398

llvm::Triple::EnvironmentType getEnvironment()
    const

Description

Get the parsed environment type of this triple.

Declared at: llvm/include/llvm/ADT/Triple.h:362

llvm::StringRef getEnvironmentName() const

Description

Get the optional environment (fourth) component of the triple, or "" if empty.

Declared at: llvm/include/llvm/ADT/Triple.h:422

static llvm::StringRef getEnvironmentTypeName(
    llvm::Triple::EnvironmentType Kind)

Description

Get the canonical name for the \p Kind environment.

Declared at: llvm/include/llvm/ADT/Triple.h:1051

Parameters

llvm::Triple::EnvironmentType Kind

llvm::VersionTuple getEnvironmentVersion() const

Description

Parse the version number from the OS name component of the triple, if present. For example, "fooos1.2.3" would return (1, 2, 3).

Declared at: llvm/include/llvm/ADT/Triple.h:368

llvm::Triple getLittleEndianArchVariant() const

Description

Form a triple with a little endian variant of the current architecture. This can be used to move across "families" of architectures where useful.

Declared at: llvm/include/llvm/ADT/Triple.h:1005

Returns

A new triple with a little endian architecture or an unknown architecture if no such variant can be found.

bool getMacOSXVersion(
    llvm::VersionTuple& Version) const

Description

Parse the version number as with getOSVersion and then translate generic "darwin" versions to the corresponding OS X versions. This may also be called with IOS triples but the OS X version number is just set to a constant 10.4.0 in that case. Returns true if successful.

Declared at: llvm/include/llvm/ADT/Triple.h:387

Parameters

llvm::VersionTuple& Version

llvm::VersionTuple getMinimumSupportedOSVersion()
    const

Description

Some platforms have different minimum supported OS versions that varies by the architecture specified in the triple. This function returns the minimum supported OS version for this triple if one an exists, or an invalid version tuple if this triple doesn't have one.

Declared at: llvm/include/llvm/ADT/Triple.h:1028

llvm::Triple::OSType getOS() const

Description

Get the parsed operating system type of this triple.

Declared at: llvm/include/llvm/ADT/Triple.h:354

llvm::StringRef getOSAndEnvironmentName() const

Description

Get the operating system and optional environment components as a single string (separated by a '-' if the environment component is present).

Declared at: llvm/include/llvm/ADT/Triple.h:426

unsigned int getOSMajorVersion() const

Description

Return just the major version number, this is specialized because it is a common query.

Declared at: llvm/include/llvm/ADT/Triple.h:381

llvm::StringRef getOSName() const

Description

Get the operating system (third) component of the triple.

Declared at: llvm/include/llvm/ADT/Triple.h:418

static llvm::StringRef getOSTypeName(
    llvm::Triple::OSType Kind)

Description

Get the canonical name for the \p Kind operating system.

Declared at: llvm/include/llvm/ADT/Triple.h:1048

Parameters

llvm::Triple::OSType Kind

llvm::VersionTuple getOSVersion() const

Description

Parse the version number from the OS name component of the triple, if present. For example, "fooos1.2.3" would return (1, 2, 3).

Declared at: llvm/include/llvm/ADT/Triple.h:377

llvm::Triple::ObjectFormatType getObjectFormat()
    const

Description

Get the object format for this triple.

Declared at: llvm/include/llvm/ADT/Triple.h:371

llvm::Triple::SubArchType getSubArch() const

Description

get the parsed subarchitecture type for this triple.

Declared at: llvm/include/llvm/ADT/Triple.h:348

const std::string& getTriple() const

Declared at: llvm/include/llvm/ADT/Triple.h:406

llvm::Triple::VendorType getVendor() const

Description

Get the parsed vendor type of this triple.

Declared at: llvm/include/llvm/ADT/Triple.h:351

llvm::StringRef getVendorName() const

Description

Get the vendor (second) component of the triple.

Declared at: llvm/include/llvm/ADT/Triple.h:415

static llvm::StringRef getVendorTypeName(
    llvm::Triple::VendorType Kind)

Description

Get the canonical name for the \p Kind vendor.

Declared at: llvm/include/llvm/ADT/Triple.h:1045

Parameters

llvm::Triple::VendorType Kind

llvm::VersionTuple getWatchOSVersion() const

Description

Parse the version number as with getOSVersion. This should only be called with WatchOS or generic triples.

Declared at: llvm/include/llvm/ADT/Triple.h:395

llvm::VersionTuple getiOSVersion() const

Description

Parse the version number as with getOSVersion. This should only be called with IOS or generic triples.

Declared at: llvm/include/llvm/ADT/Triple.h:391

bool hasDLLImportExport() const

Description

Tests if the environment supports dllimport/export annotations.

Declared at: llvm/include/llvm/ADT/Triple.h:931

bool hasDefaultDataSections() const

Description

Tests whether the target uses -data-sections as default.

Declared at: llvm/include/llvm/ADT/Triple.h:926

bool hasDefaultEmulatedTLS() const

Description

Tests whether the target uses emulated TLS as default.

Declared at: llvm/include/llvm/ADT/Triple.h:921

bool hasEnvironment() const

Description

Does this triple have the optional environment (fourth) component?

Declared at: llvm/include/llvm/ADT/Triple.h:357

bool isAArch64() const

Description

Tests whether the target is AArch64 (little and big endian).

Declared at: llvm/include/llvm/ADT/Triple.h:809

bool isAArch64(int PointerWidth) const

Description

Tests whether the target is AArch64 and pointers are the size specified by\p PointerWidth.

Declared at: llvm/include/llvm/ADT/Triple.h:816

Parameters

int PointerWidth

bool isAMDGCN() const

Description

Tests whether the target is AMDGCN

Declared at: llvm/include/llvm/ADT/Triple.h:744

bool isAMDGPU() const

Declared at: llvm/include/llvm/ADT/Triple.h:746

bool isARM() const

Description

Tests whether the target is ARM (little and big endian).

Declared at: llvm/include/llvm/ADT/Triple.h:756

bool isAndroid() const

Description

Tests whether the target is Android

Declared at: llvm/include/llvm/ADT/Triple.h:701

bool isAndroidVersionLT(unsigned int Major) const

Declared at: llvm/include/llvm/ADT/Triple.h:703

Parameters

unsigned int Major

bool isArch16Bit() const

Description

Test whether the architecture is 16-bit Note that this tests for 16-bit pointer width, and nothing else.

Declared at: llvm/include/llvm/ADT/Triple.h:449

bool isArch32Bit() const

Description

Test whether the architecture is 32-bit Note that this tests for 32-bit pointer width, and nothing else.

Declared at: llvm/include/llvm/ADT/Triple.h:444

bool isArch64Bit() const

Description

Test whether the architecture is 64-bit Note that this tests for 64-bit pointer width, and nothing else. Note that we intentionally expose only three predicates, 64-bit, 32-bit, and 16-bit. The inner details of pointer width for particular architectures is not summed up in the triple, and so only a coarse grained predicate system is provided.

Declared at: llvm/include/llvm/ADT/Triple.h:439

bool isArm64e() const

Description

Tests whether the target is the Apple "arm64e" AArch64 subarch.

Declared at: llvm/include/llvm/ADT/Triple.h:904

bool isArmMClass() const

Description

Tests whether the target is an M-class.

Declared at: llvm/include/llvm/ADT/Triple.h:794

bool isArmT32() const

Description

Tests whether the target is T32.

Declared at: llvm/include/llvm/ADT/Triple.h:774

bool isCSKY() const

Declared at: llvm/include/llvm/ADT/Triple.h:899

bool isCompatibleWith(
    const llvm::Triple& Other) const

Description

Test whether target triples are compatible.

Declared at: llvm/include/llvm/ADT/Triple.h:1019

Parameters

const llvm::Triple& Other

bool isDXIL() const

Description

Tests whether the target is DXIL.

Declared at: llvm/include/llvm/ADT/Triple.h:724

bool isDriverKit() const

Description

Is this an Apple DriverKit triple.

Declared at: llvm/include/llvm/ADT/Triple.h:503

bool isGNUEnvironment() const

Declared at: llvm/include/llvm/ADT/Triple.h:554

bool isKnownWindowsMSVCEnvironment() const

Description

Checks if the environment is MSVC.

Declared at: llvm/include/llvm/ADT/Triple.h:576

bool isLittleEndian() const

Description

Tests whether the target triple is little endian.

Declared at: llvm/include/llvm/ADT/Triple.h:1016

Returns

true if the triple is little endian, false otherwise.

bool isLoongArch() const

Description

Tests whether the target is LoongArch (32- and 64-bit).

Declared at: llvm/include/llvm/ADT/Triple.h:827

bool isMIPS() const

Description

Tests whether the target is MIPS (little and big endian, 32- or 64-bit).

Declared at: llvm/include/llvm/ADT/Triple.h:842

bool isMIPS32() const

Description

Tests whether the target is MIPS 32-bit (little and big endian).

Declared at: llvm/include/llvm/ADT/Triple.h:832

bool isMIPS64() const

Description

Tests whether the target is MIPS 64-bit (little and big endian).

Declared at: llvm/include/llvm/ADT/Triple.h:837

bool isMacCatalystEnvironment() const

Declared at: llvm/include/llvm/ADT/Triple.h:516

bool isMacOSX() const

Description

Is this a Mac OS X triple. For legacy reasons, we support both "darwin" and "osx" as OS X triples.

Declared at: llvm/include/llvm/ADT/Triple.h:475

bool isMacOSXVersionLT(
    unsigned int Major,
    unsigned int Minor = 0,
    unsigned int Micro = 0) const

Description

Comparison function for checking OS X version compatibility, which handles supporting skewed version numbering schemes used by the "darwin" triples.

Declared at: llvm/include/llvm/ADT/Triple.h:470

Parameters

unsigned int Major
unsigned int Minor = 0
unsigned int Micro = 0

bool isMusl() const

Description

Tests whether the environment is musl-libc

Declared at: llvm/include/llvm/ADT/Triple.h:716

bool isNVPTX() const

Description

Tests whether the target is NVPTX (32- or 64-bit).

Declared at: llvm/include/llvm/ADT/Triple.h:739

bool isOSAIX() const

Description

Tests whether the OS is AIX.

Declared at: llvm/include/llvm/ADT/Triple.h:651

bool isOSBinFormatCOFF() const

Description

Tests whether the OS uses the COFF binary format.

Declared at: llvm/include/llvm/ADT/Triple.h:661

bool isOSBinFormatELF() const

Description

Tests whether the OS uses the ELF binary format.

Declared at: llvm/include/llvm/ADT/Triple.h:656

bool isOSBinFormatGOFF() const

Description

Tests whether the OS uses the GOFF binary format.

Declared at: llvm/include/llvm/ADT/Triple.h:666

bool isOSBinFormatMachO() const

Description

Tests whether the environment is MachO.

Declared at: llvm/include/llvm/ADT/Triple.h:669

bool isOSBinFormatWasm() const

Description

Tests whether the OS uses the Wasm binary format.

Declared at: llvm/include/llvm/ADT/Triple.h:674

bool isOSBinFormatXCOFF() const

Description

Tests whether the OS uses the XCOFF binary format.

Declared at: llvm/include/llvm/ADT/Triple.h:679

bool isOSContiki() const

Declared at: llvm/include/llvm/ADT/Triple.h:561

bool isOSCygMing() const

Description

Tests for either Cygwin or MinGW OS

Declared at: llvm/include/llvm/ADT/Triple.h:603

bool isOSDarwin() const

Description

Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, or DriverKit).

Declared at: llvm/include/llvm/ADT/Triple.h:508

bool isOSDragonFly() const

Declared at: llvm/include/llvm/ADT/Triple.h:542

bool isOSEmscripten() const

Description

Tests whether the OS is Emscripten.

Declared at: llvm/include/llvm/ADT/Triple.h:639

bool isOSFreeBSD() const

Declared at: llvm/include/llvm/ADT/Triple.h:534

bool isOSFuchsia() const

Declared at: llvm/include/llvm/ADT/Triple.h:538

bool isOSGlibc() const

Description

Tests whether the OS uses glibc.

Declared at: llvm/include/llvm/ADT/Triple.h:644

bool isOSHaiku() const

Description

Tests whether the OS is Haiku.

Declared at: llvm/include/llvm/ADT/Triple.h:566

bool isOSHurd() const

Description

Tests whether the OS is Hurd.

Declared at: llvm/include/llvm/ADT/Triple.h:629

bool isOSIAMCU() const

Declared at: llvm/include/llvm/ADT/Triple.h:548

bool isOSKFreeBSD() const

Description

Tests whether the OS is kFreeBSD.

Declared at: llvm/include/llvm/ADT/Triple.h:624

bool isOSLinux() const

Description

Tests whether the OS is Linux.

Declared at: llvm/include/llvm/ADT/Triple.h:619

bool isOSMSVCRT() const

Description

Is this a "Windows" OS targeting a "MSVCRT.dll" environment.

Declared at: llvm/include/llvm/ADT/Triple.h:608

bool isOSNaCl() const

Description

Tests whether the OS is NaCl (Native Client)

Declared at: llvm/include/llvm/ADT/Triple.h:614

bool isOSNetBSD() const

Declared at: llvm/include/llvm/ADT/Triple.h:526

bool isOSOpenBSD() const

Declared at: llvm/include/llvm/ADT/Triple.h:530

bool isOSSolaris() const

Declared at: llvm/include/llvm/ADT/Triple.h:544

bool isOSUnknown() const

Declared at: llvm/include/llvm/ADT/Triple.h:552

bool isOSVersionLT(
    const llvm::Triple& Other) const

Declared at: llvm/include/llvm/ADT/Triple.h:464

Parameters

const llvm::Triple& Other

bool isOSVersionLT(unsigned int Major,
                   unsigned int Minor = 0,
                   unsigned int Micro = 0) const

Description

Helper function for doing comparisons against version numbers included in the target triple.

Declared at: llvm/include/llvm/ADT/Triple.h:453

Parameters

unsigned int Major
unsigned int Minor = 0
unsigned int Micro = 0

bool isOSWASI() const

Description

Tests whether the OS is WASI.

Declared at: llvm/include/llvm/ADT/Triple.h:634

bool isOSWindows() const

Description

Tests whether the OS is Windows.

Declared at: llvm/include/llvm/ADT/Triple.h:571

bool isOSzOS() const

Declared at: llvm/include/llvm/ADT/Triple.h:505

bool isPPC() const

Description

Tests whether the target is PowerPC (32- or 64-bit LE or BE).

Declared at: llvm/include/llvm/ADT/Triple.h:847

bool isPPC32() const

Description

Tests whether the target is 32-bit PowerPC (little and big endian).

Declared at: llvm/include/llvm/ADT/Triple.h:853

bool isPPC64() const

Description

Tests whether the target is 64-bit PowerPC (little and big endian).

Declared at: llvm/include/llvm/ADT/Triple.h:858

bool isPS() const

Description

Tests whether the target is the PS4 or PS5 platform.

Declared at: llvm/include/llvm/ADT/Triple.h:698

bool isPS4() const

Description

Tests whether the target is the PS4 platform.

Declared at: llvm/include/llvm/ADT/Triple.h:684

bool isPS5() const

Description

Tests whether the target is the PS5 platform.

Declared at: llvm/include/llvm/ADT/Triple.h:691

bool isRISCV() const

Description

Tests whether the target is RISC-V (32- and 64-bit).

Declared at: llvm/include/llvm/ADT/Triple.h:863

bool isSPARC() const

Description

Tests whether the target is SPARC.

Declared at: llvm/include/llvm/ADT/Triple.h:876

bool isSPARC32() const

Description

Tests whether the target is 32-bit SPARC (little and big endian).

Declared at: llvm/include/llvm/ADT/Triple.h:868

bool isSPARC64() const

Description

Tests whether the target is 64-bit SPARC (big endian).

Declared at: llvm/include/llvm/ADT/Triple.h:873

bool isSPIR() const

Description

Tests whether the target is SPIR (32- or 64-bit).

Declared at: llvm/include/llvm/ADT/Triple.h:729

bool isSPIRV() const

Description

Tests whether the target is SPIR-V (32/64-bit).

Declared at: llvm/include/llvm/ADT/Triple.h:734

bool isSimulatorEnvironment() const

Declared at: llvm/include/llvm/ADT/Triple.h:512

bool isSystemZ() const

Description

Tests whether the target is SystemZ.

Declared at: llvm/include/llvm/ADT/Triple.h:879

bool isTargetEHABICompatible() const

Description

Tests whether the target supports the EHABI exception handling standard.

Declared at: llvm/include/llvm/ADT/Triple.h:762

bool isTargetMachineMac() const

Description

Returns true for targets that run on a macOS machine.

Declared at: llvm/include/llvm/ADT/Triple.h:521

bool isThumb() const

Description

Tests whether the target is Thumb (little and big endian).

Declared at: llvm/include/llvm/ADT/Triple.h:751

bool isTvOS() const

Description

Is this an Apple tvOS triple.

Declared at: llvm/include/llvm/ADT/Triple.h:489

bool isVE() const

Description

Tests whether the target is VE

Declared at: llvm/include/llvm/ADT/Triple.h:889

bool isWasm() const

Description

Tests whether the target is wasm (32- and 64-bit).

Declared at: llvm/include/llvm/ADT/Triple.h:894

bool isWatchABI() const

Declared at: llvm/include/llvm/ADT/Triple.h:498

bool isWatchOS() const

Description

Is this an Apple watchOS triple.

Declared at: llvm/include/llvm/ADT/Triple.h:494

bool isWindowsCoreCLREnvironment() const

Declared at: llvm/include/llvm/ADT/Triple.h:586

bool isWindowsCygwinEnvironment() const

Declared at: llvm/include/llvm/ADT/Triple.h:594

bool isWindowsGNUEnvironment() const

Declared at: llvm/include/llvm/ADT/Triple.h:598

bool isWindowsItaniumEnvironment() const

Declared at: llvm/include/llvm/ADT/Triple.h:590

bool isWindowsMSVCEnvironment() const

Description

Checks if the environment could be MSVC.

Declared at: llvm/include/llvm/ADT/Triple.h:581

bool isX32() const

Description

Tests whether the target is X32.

Declared at: llvm/include/llvm/ADT/Triple.h:910

bool isX86() const

Description

Tests whether the target is x86 (32- or 64-bit).

Declared at: llvm/include/llvm/ADT/Triple.h:884

bool isiOS() const

Description

Is this an iOS triple. Note: This identifies tvOS as a variant of iOS. If that ever changes, i.e., if the two operating systems diverge or their version numbers get out of sync, that will need to be changed. watchOS has completely different version numbers so it is not included.

Declared at: llvm/include/llvm/ADT/Triple.h:484

std::string merge(const llvm::Triple& Other) const

Description

Merge target triples.

Declared at: llvm/include/llvm/ADT/Triple.h:1022

Parameters

const llvm::Triple& Other

std::string normalize() const

Description

Return the normalized form of this triple's string.

Declared at: llvm/include/llvm/ADT/Triple.h:338

static std::string normalize(llvm::StringRef Str)

Description

Turn an arbitrary machine specification into the canonical triple form (or something sensible that the Triple class understands if nothing better can reasonably be done). In particular, it handles the common case in which otherwise valid components are in the wrong order.

Declared at: llvm/include/llvm/ADT/Triple.h:335

Parameters

llvm::StringRef Str

void setArch(
    llvm::Triple::ArchType Kind,
    llvm::Triple::SubArchType SubArch = NoSubArch)

Description

Set the architecture (first) component of the triple to a known type.

Declared at: llvm/include/llvm/ADT/Triple.h:938

Parameters

llvm::Triple::ArchType Kind
llvm::Triple::SubArchType SubArch = NoSubArch

void setArchName(llvm::StringRef Str)

Description

Set the architecture (first) component of the triple by name.

Declared at: llvm/include/llvm/ADT/Triple.h:956

Parameters

llvm::StringRef Str

void setEnvironment(
    llvm::Triple::EnvironmentType Kind)

Description

Set the environment (fourth) component of the triple to a known type.

Declared at: llvm/include/llvm/ADT/Triple.h:947

Parameters

llvm::Triple::EnvironmentType Kind

void setEnvironmentName(llvm::StringRef Str)

Description

Set the optional environment (fourth) component of the triple by name.

Declared at: llvm/include/llvm/ADT/Triple.h:965

Parameters

llvm::StringRef Str

void setOS(llvm::Triple::OSType Kind)

Description

Set the operating system (third) component of the triple to a known type.

Declared at: llvm/include/llvm/ADT/Triple.h:944

Parameters

llvm::Triple::OSType Kind

void setOSAndEnvironmentName(llvm::StringRef Str)

Description

Set the operating system and optional environment components with a single string.

Declared at: llvm/include/llvm/ADT/Triple.h:969

Parameters

llvm::StringRef Str

void setOSName(llvm::StringRef Str)

Description

Set the operating system (third) component of the triple by name.

Declared at: llvm/include/llvm/ADT/Triple.h:962

Parameters

llvm::StringRef Str

void setObjectFormat(
    llvm::Triple::ObjectFormatType Kind)

Description

Set the object file format.

Declared at: llvm/include/llvm/ADT/Triple.h:950

Parameters

llvm::Triple::ObjectFormatType Kind

void setTriple(const llvm::Twine& Str)

Description

Set all components to the new triple \p Str.

Declared at: llvm/include/llvm/ADT/Triple.h:953

Parameters

const llvm::Twine& Str

void setVendor(llvm::Triple::VendorType Kind)

Description

Set the vendor (second) component of the triple to a known type.

Declared at: llvm/include/llvm/ADT/Triple.h:941

Parameters

llvm::Triple::VendorType Kind

void setVendorName(llvm::StringRef Str)

Description

Set the vendor (second) component of the triple by name.

Declared at: llvm/include/llvm/ADT/Triple.h:959

Parameters

llvm::StringRef Str

const std::string& str() const

Description

@ } @ {

Declared at: llvm/include/llvm/ADT/Triple.h:404

bool supportsCOMDAT() const

Description

Tests whether the target supports comdat

Declared at: llvm/include/llvm/ADT/Triple.h:916