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:43
Method Overview
- public Triple(const llvm::Twine & Str)
- public Triple(const llvm::Twine & ArchStr, const llvm::Twine & VendorStr, const llvm::Twine & OSStr)
- public Triple(const llvm::Twine & ArchStr, const llvm::Twine & VendorStr, const llvm::Twine & OSStr, const llvm::Twine & EnvironmentStr)
- public Triple()
- public llvm::Triple get32BitArchVariant() const
- public llvm::Triple get64BitArchVariant() const
- public llvm::StringRef getARMCPUForArch(llvm::StringRef Arch = llvm::StringRef()) const
- public llvm::Triple::ArchType getArch() const
- public llvm::StringRef getArchName() const
- public static llvm::Triple::ArchType getArchTypeForLLVMName(llvm::StringRef Str)
- public static llvm::StringRef getArchTypeName(llvm::Triple::ArchType Kind)
- public static llvm::StringRef getArchTypePrefix(llvm::Triple::ArchType Kind)
- public llvm::Triple getBigEndianArchVariant() const
- public llvm::Triple::EnvironmentType getEnvironment() const
- public llvm::StringRef getEnvironmentName() const
- public static llvm::StringRef getEnvironmentTypeName(llvm::Triple::EnvironmentType Kind)
- public void getEnvironmentVersion(unsigned int & Major, unsigned int & Minor, unsigned int & Micro) const
- public llvm::Triple getLittleEndianArchVariant() const
- public bool getMacOSXVersion(unsigned int & Major, unsigned int & Minor, unsigned int & Micro) const
- public llvm::Triple::OSType getOS() const
- public llvm::StringRef getOSAndEnvironmentName() const
- public unsigned int getOSMajorVersion() const
- public llvm::StringRef getOSName() const
- public static llvm::StringRef getOSTypeName(llvm::Triple::OSType Kind)
- public void getOSVersion(unsigned int & Major, unsigned int & Minor, unsigned int & Micro) const
- public llvm::Triple::ObjectFormatType getObjectFormat() const
- public llvm::Triple::SubArchType getSubArch() const
- public const std::string & getTriple() const
- public llvm::Triple::VendorType getVendor() const
- public llvm::StringRef getVendorName() const
- public static llvm::StringRef getVendorTypeName(llvm::Triple::VendorType Kind)
- public void getWatchOSVersion(unsigned int & Major, unsigned int & Minor, unsigned int & Micro) const
- public void getiOSVersion(unsigned int & Major, unsigned int & Minor, unsigned int & Micro) const
- public bool hasDefaultEmulatedTLS() const
- public bool hasEnvironment() const
- public bool isAArch64() const
- public bool isARM() const
- public bool isAndroid() const
- public bool isAndroidVersionLT(unsigned int Major) const
- public bool isArch16Bit() const
- public bool isArch32Bit() const
- public bool isArch64Bit() const
- public bool isCompatibleWith(const llvm::Triple & Other) const
- public bool isGNUEnvironment() const
- public bool isKnownWindowsMSVCEnvironment() const
- public bool isLittleEndian() const
- public bool isMIPS() const
- public bool isMIPS32() const
- public bool isMIPS64() const
- public bool isMacCatalystEnvironment() const
- public bool isMacOSX() const
- public bool isMacOSXVersionLT(unsigned int Major, unsigned int Minor = 0, unsigned int Micro = 0) const
- public bool isMusl() const
- public bool isNVPTX() const
- public bool isOSAIX() const
- public bool isOSBinFormatCOFF() const
- public bool isOSBinFormatELF() const
- public bool isOSBinFormatMachO() const
- public bool isOSBinFormatWasm() const
- public bool isOSBinFormatXCOFF() const
- public bool isOSContiki() const
- public bool isOSCygMing() const
- public bool isOSDarwin() const
- public bool isOSDragonFly() const
- public bool isOSEmscripten() const
- public bool isOSFreeBSD() const
- public bool isOSFuchsia() const
- public bool isOSGlibc() const
- public bool isOSHaiku() const
- public bool isOSHurd() const
- public bool isOSIAMCU() const
- public bool isOSKFreeBSD() const
- public bool isOSLinux() const
- public bool isOSMSVCRT() const
- public bool isOSNaCl() const
- public bool isOSNetBSD() const
- public bool isOSOpenBSD() const
- public bool isOSSolaris() const
- public bool isOSUnknown() const
- public bool isOSVersionLT(unsigned int Major, unsigned int Minor = 0, unsigned int Micro = 0) const
- public bool isOSVersionLT(const llvm::Triple & Other) const
- public bool isOSWASI() const
- public bool isOSWindows() const
- public bool isPPC64() const
- public bool isPS4() const
- public bool isPS4CPU() const
- public bool isRISCV() const
- public bool isSPIR() const
- public bool isSimulatorEnvironment() const
- public bool isThumb() const
- public bool isTvOS() const
- public bool isVE() const
- public bool isWatchABI() const
- public bool isWatchOS() const
- public bool isWindowsCoreCLREnvironment() const
- public bool isWindowsCygwinEnvironment() const
- public bool isWindowsGNUEnvironment() const
- public bool isWindowsItaniumEnvironment() const
- public bool isWindowsMSVCEnvironment() const
- public bool isX86() const
- public bool isiOS() const
- public std::string merge(const llvm::Triple & Other) const
- public std::string normalize() const
- public static std::string normalize(llvm::StringRef Str)
- public void setArch(llvm::Triple::ArchType Kind)
- public void setArchName(llvm::StringRef Str)
- public void setEnvironment(llvm::Triple::EnvironmentType Kind)
- public void setEnvironmentName(llvm::StringRef Str)
- public void setOS(llvm::Triple::OSType Kind)
- public void setOSAndEnvironmentName(llvm::StringRef Str)
- public void setOSName(llvm::StringRef Str)
- public void setObjectFormat(llvm::Triple::ObjectFormatType Kind)
- public void setTriple(const llvm::Twine & Str)
- public void setVendor(llvm::Triple::VendorType Kind)
- public void setVendorName(llvm::StringRef Str)
- public const std::string & str() const
- public bool supportsCOMDAT() const
Methods
¶Triple(const llvm::Twine& Str)
Triple(const llvm::Twine& Str)
Declared at: llvm/include/llvm/ADT/Triple.h:263
Parameters
- const llvm::Twine& Str
¶Triple(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)
Declared at: llvm/include/llvm/ADT/Triple.h:264
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)
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:265
Parameters
- const llvm::Twine& ArchStr
- const llvm::Twine& VendorStr
- const llvm::Twine& OSStr
- const llvm::Twine& EnvironmentStr
¶Triple()
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:259
¶llvm::Triple get32BitArchVariant() const
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:810
Returns
A new triple with a 32-bit architecture or an unknown architecture if no such variant can be found.
¶llvm::Triple get64BitArchVariant() const
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:818
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
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:840
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
llvm::Triple::ArchType getArch() const
Description
getArch - Get the parsed architecture type of this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:297
¶llvm::StringRef getArchName() const
llvm::StringRef getArchName() const
Description
getArchName - Get the architecture (first) component of the triple.
Declared at: llvm/include/llvm/ADT/Triple.h:372
¶static llvm::Triple::ArchType
getArchTypeForLLVMName(llvm::StringRef Str)
static llvm::Triple::ArchType
getArchTypeForLLVMName(llvm::StringRef Str)
Description
getArchTypeForLLVMName - The canonical type for the given LLVM architecture name (e.g., "x86").
Declared at: llvm/include/llvm/ADT/Triple.h:884
Parameters
- llvm::StringRef Str
¶static llvm::StringRef getArchTypeName(
llvm::Triple::ArchType Kind)
static llvm::StringRef getArchTypeName(
llvm::Triple::ArchType Kind)
Description
getArchTypeName - Get the canonical name for the \p Kind architecture.
Declared at: llvm/include/llvm/ADT/Triple.h:858
Parameters
- llvm::Triple::ArchType Kind
¶static llvm::StringRef getArchTypePrefix(
llvm::Triple::ArchType Kind)
static llvm::StringRef getArchTypePrefix(
llvm::Triple::ArchType Kind)
Description
getArchTypePrefix - 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:866
Parameters
- llvm::Triple::ArchType Kind
Returns
- The architecture prefix, or 0 if none is defined.
¶llvm::Triple getBigEndianArchVariant() const
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:826
Returns
A new triple with a big endian architecture or an unknown architecture if no such variant can be found.
¶llvm::Triple::EnvironmentType getEnvironment()
const
llvm::Triple::EnvironmentType getEnvironment()
const
Description
getEnvironment - Get the parsed environment type of this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:315
¶llvm::StringRef getEnvironmentName() const
llvm::StringRef getEnvironmentName() const
Description
getEnvironmentName - Get the optional environment (fourth) component of the triple, or "" if empty.
Declared at: llvm/include/llvm/ADT/Triple.h:383
¶static llvm::StringRef getEnvironmentTypeName(
llvm::Triple::EnvironmentType Kind)
static llvm::StringRef getEnvironmentTypeName(
llvm::Triple::EnvironmentType Kind)
Description
getEnvironmentTypeName - Get the canonical name for the \p Kind environment.
Declared at: llvm/include/llvm/ADT/Triple.h:876
Parameters
- llvm::Triple::EnvironmentType Kind
¶void getEnvironmentVersion(
unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) const
void getEnvironmentVersion(
unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) 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). If an entry is not defined, it will be returned as 0.
Declared at: llvm/include/llvm/ADT/Triple.h:323
Parameters
- unsigned int& Major
- unsigned int& Minor
- unsigned int& Micro
¶llvm::Triple getLittleEndianArchVariant() const
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:834
Returns
A new triple with a little endian architecture or an unknown architecture if no such variant can be found.
¶bool getMacOSXVersion(unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) const
bool getMacOSXVersion(unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) const
Description
getMacOSXVersion - 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:349
Parameters
- unsigned int& Major
- unsigned int& Minor
- unsigned int& Micro
¶llvm::Triple::OSType getOS() const
llvm::Triple::OSType getOS() const
Description
getOS - Get the parsed operating system type of this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:306
¶llvm::StringRef getOSAndEnvironmentName() const
llvm::StringRef getOSAndEnvironmentName() const
Description
getOSAndEnvironmentName - 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:388
¶unsigned int getOSMajorVersion() const
unsigned int getOSMajorVersion() const
Description
getOSMajorVersion - Return just the major version number, this is specialized because it is a common query.
Declared at: llvm/include/llvm/ADT/Triple.h:339
¶llvm::StringRef getOSName() const
llvm::StringRef getOSName() const
Description
getOSName - Get the operating system (third) component of the triple.
Declared at: llvm/include/llvm/ADT/Triple.h:379
¶static llvm::StringRef getOSTypeName(
llvm::Triple::OSType Kind)
static llvm::StringRef getOSTypeName(
llvm::Triple::OSType Kind)
Description
getOSTypeName - Get the canonical name for the \p Kind operating system.
Declared at: llvm/include/llvm/ADT/Triple.h:872
Parameters
- llvm::Triple::OSType Kind
¶void getOSVersion(unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) const
void getOSVersion(unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) const
Description
getOSVersion - Parse the version number from the OS name component of the triple, if present. For example, "fooos1.2.3" would return (1, 2, 3). If an entry is not defined, it will be returned as 0.
Declared at: llvm/include/llvm/ADT/Triple.h:335
Parameters
- unsigned int& Major
- unsigned int& Minor
- unsigned int& Micro
¶llvm::Triple::ObjectFormatType getObjectFormat()
const
llvm::Triple::ObjectFormatType getObjectFormat()
const
Description
getFormat - Get the object format for this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:327
¶llvm::Triple::SubArchType getSubArch() const
llvm::Triple::SubArchType getSubArch() const
Description
getSubArch - get the parsed subarchitecture type for this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:300
¶const std::string& getTriple() const
const std::string& getTriple() const
Declared at: llvm/include/llvm/ADT/Triple.h:368
¶llvm::Triple::VendorType getVendor() const
llvm::Triple::VendorType getVendor() const
Description
getVendor - Get the parsed vendor type of this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:303
¶llvm::StringRef getVendorName() const
llvm::StringRef getVendorName() const
Description
getVendorName - Get the vendor (second) component of the triple.
Declared at: llvm/include/llvm/ADT/Triple.h:375
¶static llvm::StringRef getVendorTypeName(
llvm::Triple::VendorType Kind)
static llvm::StringRef getVendorTypeName(
llvm::Triple::VendorType Kind)
Description
getVendorTypeName - Get the canonical name for the \p Kind vendor.
Declared at: llvm/include/llvm/ADT/Triple.h:869
Parameters
- llvm::Triple::VendorType Kind
¶void getWatchOSVersion(unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) const
void getWatchOSVersion(unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) const
Description
getWatchOSVersion - 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:359
Parameters
- unsigned int& Major
- unsigned int& Minor
- unsigned int& Micro
¶void getiOSVersion(unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) const
void getiOSVersion(unsigned int& Major,
unsigned int& Minor,
unsigned int& Micro) const
Description
getiOSVersion - 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:354
Parameters
- unsigned int& Major
- unsigned int& Minor
- unsigned int& Micro
¶bool hasDefaultEmulatedTLS() const
bool hasDefaultEmulatedTLS() const
Description
Tests whether the target uses emulated TLS as default.
Declared at: llvm/include/llvm/ADT/Triple.h:750
¶bool hasEnvironment() const
bool hasEnvironment() const
Description
hasEnvironment - Does this triple have the optional environment (fourth) component?
Declared at: llvm/include/llvm/ADT/Triple.h:310
¶bool isAArch64() const
bool isAArch64() const
Description
Tests whether the target is AArch64 (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:705
¶bool isARM() const
bool isARM() const
Description
Tests whether the target is ARM (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:700
¶bool isAndroid() const
bool isAndroid() const
Description
Tests whether the target is Android
Declared at: llvm/include/llvm/ADT/Triple.h:662
¶bool isAndroidVersionLT(unsigned int Major) const
bool isAndroidVersionLT(unsigned int Major) const
Declared at: llvm/include/llvm/ADT/Triple.h:664
Parameters
- unsigned int Major
¶bool isArch16Bit() const
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:411
¶bool isArch32Bit() const
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:406
¶bool isArch64Bit() const
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:401
¶bool isCompatibleWith(
const llvm::Triple& Other) const
bool isCompatibleWith(
const llvm::Triple& Other) const
Description
Test whether target triples are compatible.
Declared at: llvm/include/llvm/ADT/Triple.h:848
Parameters
- const llvm::Triple& Other
¶bool isGNUEnvironment() const
bool isGNUEnvironment() const
Declared at: llvm/include/llvm/ADT/Triple.h:522
¶bool isKnownWindowsMSVCEnvironment() const
bool isKnownWindowsMSVCEnvironment() const
Description
Checks if the environment is MSVC.
Declared at: llvm/include/llvm/ADT/Triple.h:544
¶bool isLittleEndian() const
bool isLittleEndian() const
Description
Tests whether the target triple is little endian.
Declared at: llvm/include/llvm/ADT/Triple.h:845
Returns
true if the triple is little endian, false otherwise.
¶bool isMIPS() const
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:720
¶bool isMIPS32() const
bool isMIPS32() const
Description
Tests whether the target is MIPS 32-bit (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:710
¶bool isMIPS64() const
bool isMIPS64() const
Description
Tests whether the target is MIPS 64-bit (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:715
¶bool isMacCatalystEnvironment() const
bool isMacCatalystEnvironment() const
Declared at: llvm/include/llvm/ADT/Triple.h:490
¶bool isMacOSX() const
bool isMacOSX() const
Description
isMacOSX - 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:454
¶bool isMacOSXVersionLT(
unsigned int Major,
unsigned int Minor = 0,
unsigned int Micro = 0) const
bool isMacOSXVersionLT(
unsigned int Major,
unsigned int Minor = 0,
unsigned int Micro = 0) const
Description
isMacOSXVersionLT - 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:439
Parameters
- unsigned int Major
- unsigned int Minor = 0
- unsigned int Micro = 0
¶bool isMusl() const
bool isMusl() const
Description
Tests whether the environment is musl-libc
Declared at: llvm/include/llvm/ADT/Triple.h:678
¶bool isNVPTX() const
bool isNVPTX() const
Description
Tests whether the target is NVPTX (32- or 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:690
¶bool isOSAIX() const
bool isOSAIX() const
Description
Tests whether the OS is AIX.
Declared at: llvm/include/llvm/ADT/Triple.h:619
¶bool isOSBinFormatCOFF() const
bool isOSBinFormatCOFF() const
Description
Tests whether the OS uses the COFF binary format.
Declared at: llvm/include/llvm/ADT/Triple.h:629
¶bool isOSBinFormatELF() const
bool isOSBinFormatELF() const
Description
Tests whether the OS uses the ELF binary format.
Declared at: llvm/include/llvm/ADT/Triple.h:624
¶bool isOSBinFormatMachO() const
bool isOSBinFormatMachO() const
Description
Tests whether the environment is MachO.
Declared at: llvm/include/llvm/ADT/Triple.h:634
¶bool isOSBinFormatWasm() const
bool isOSBinFormatWasm() const
Description
Tests whether the OS uses the Wasm binary format.
Declared at: llvm/include/llvm/ADT/Triple.h:639
¶bool isOSBinFormatXCOFF() const
bool isOSBinFormatXCOFF() const
Description
Tests whether the OS uses the XCOFF binary format.
Declared at: llvm/include/llvm/ADT/Triple.h:644
¶bool isOSContiki() const
bool isOSContiki() const
Declared at: llvm/include/llvm/ADT/Triple.h:529
¶bool isOSCygMing() const
bool isOSCygMing() const
Description
Tests for either Cygwin or MinGW OS
Declared at: llvm/include/llvm/ADT/Triple.h:571
¶bool isOSDarwin() const
bool isOSDarwin() const
Description
isOSDarwin - Is this a "Darwin" OS (macOS, iOS, tvOS or watchOS).
Declared at: llvm/include/llvm/ADT/Triple.h:482
¶bool isOSDragonFly() const
bool isOSDragonFly() const
Declared at: llvm/include/llvm/ADT/Triple.h:510
¶bool isOSEmscripten() const
bool isOSEmscripten() const
Description
Tests whether the OS is Emscripten.
Declared at: llvm/include/llvm/ADT/Triple.h:607
¶bool isOSFreeBSD() const
bool isOSFreeBSD() const
Declared at: llvm/include/llvm/ADT/Triple.h:502
¶bool isOSFuchsia() const
bool isOSFuchsia() const
Declared at: llvm/include/llvm/ADT/Triple.h:506
¶bool isOSGlibc() const
bool isOSGlibc() const
Description
Tests whether the OS uses glibc.
Declared at: llvm/include/llvm/ADT/Triple.h:612
¶bool isOSHaiku() const
bool isOSHaiku() const
Description
Tests whether the OS is Haiku.
Declared at: llvm/include/llvm/ADT/Triple.h:534
¶bool isOSHurd() const
bool isOSHurd() const
Description
Tests whether the OS is Hurd.
Declared at: llvm/include/llvm/ADT/Triple.h:597
¶bool isOSIAMCU() const
bool isOSIAMCU() const
Declared at: llvm/include/llvm/ADT/Triple.h:516
¶bool isOSKFreeBSD() const
bool isOSKFreeBSD() const
Description
Tests whether the OS is kFreeBSD.
Declared at: llvm/include/llvm/ADT/Triple.h:592
¶bool isOSLinux() const
bool isOSLinux() const
Description
Tests whether the OS is Linux.
Declared at: llvm/include/llvm/ADT/Triple.h:587
¶bool isOSMSVCRT() const
bool isOSMSVCRT() const
Description
Is this a "Windows" OS targeting a "MSVCRT.dll" environment.
Declared at: llvm/include/llvm/ADT/Triple.h:576
¶bool isOSNaCl() const
bool isOSNaCl() const
Description
Tests whether the OS is NaCl (Native Client)
Declared at: llvm/include/llvm/ADT/Triple.h:582
¶bool isOSNetBSD() const
bool isOSNetBSD() const
Declared at: llvm/include/llvm/ADT/Triple.h:494
¶bool isOSOpenBSD() const
bool isOSOpenBSD() const
Declared at: llvm/include/llvm/ADT/Triple.h:498
¶bool isOSSolaris() const
bool isOSSolaris() const
Declared at: llvm/include/llvm/ADT/Triple.h:512
¶bool isOSUnknown() const
bool isOSUnknown() const
Declared at: llvm/include/llvm/ADT/Triple.h:520
¶bool isOSVersionLT(unsigned int Major,
unsigned int Minor = 0,
unsigned int Micro = 0) const
bool isOSVersionLT(unsigned int Major,
unsigned int Minor = 0,
unsigned int Micro = 0) const
Description
isOSVersionLT - Helper function for doing comparisons against version numbers included in the target triple.
Declared at: llvm/include/llvm/ADT/Triple.h:415
Parameters
- unsigned int Major
- unsigned int Minor = 0
- unsigned int Micro = 0
¶bool isOSVersionLT(
const llvm::Triple& Other) const
bool isOSVersionLT(
const llvm::Triple& Other) const
Declared at: llvm/include/llvm/ADT/Triple.h:430
Parameters
- const llvm::Triple& Other
¶bool isOSWASI() const
bool isOSWASI() const
Description
Tests whether the OS is WASI.
Declared at: llvm/include/llvm/ADT/Triple.h:602
¶bool isOSWindows() const
bool isOSWindows() const
Description
Tests whether the OS is Windows.
Declared at: llvm/include/llvm/ADT/Triple.h:539
¶bool isPPC64() const
bool isPPC64() const
Description
Tests whether the target is 64-bit PowerPC (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:725
¶bool isPS4() const
bool isPS4() const
Description
Tests whether the target is the PS4 platform
Declared at: llvm/include/llvm/ADT/Triple.h:656
¶bool isPS4CPU() const
bool isPS4CPU() const
Description
Tests whether the target is the PS4 CPU
Declared at: llvm/include/llvm/ADT/Triple.h:649
¶bool isRISCV() const
bool isRISCV() const
Description
Tests whether the target is RISC-V (32- and 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:730
¶bool isSPIR() const
bool isSPIR() const
Description
Tests whether the target is SPIR (32- or 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:685
¶bool isSimulatorEnvironment() const
bool isSimulatorEnvironment() const
Declared at: llvm/include/llvm/ADT/Triple.h:486
¶bool isThumb() const
bool isThumb() const
Description
Tests whether the target is Thumb (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:695
¶bool isTvOS() const
bool isTvOS() const
Description
Is this an Apple tvOS triple.
Declared at: llvm/include/llvm/ADT/Triple.h:468
¶bool isVE() const
bool isVE() const
Description
Tests whether the target is VE
Declared at: llvm/include/llvm/ADT/Triple.h:740
¶bool isWatchABI() const
bool isWatchABI() const
Declared at: llvm/include/llvm/ADT/Triple.h:477
¶bool isWatchOS() const
bool isWatchOS() const
Description
Is this an Apple watchOS triple.
Declared at: llvm/include/llvm/ADT/Triple.h:473
¶bool isWindowsCoreCLREnvironment() const
bool isWindowsCoreCLREnvironment() const
Declared at: llvm/include/llvm/ADT/Triple.h:554
¶bool isWindowsCygwinEnvironment() const
bool isWindowsCygwinEnvironment() const
Declared at: llvm/include/llvm/ADT/Triple.h:562
¶bool isWindowsGNUEnvironment() const
bool isWindowsGNUEnvironment() const
Declared at: llvm/include/llvm/ADT/Triple.h:566
¶bool isWindowsItaniumEnvironment() const
bool isWindowsItaniumEnvironment() const
Declared at: llvm/include/llvm/ADT/Triple.h:558
¶bool isWindowsMSVCEnvironment() const
bool isWindowsMSVCEnvironment() const
Description
Checks if the environment could be MSVC.
Declared at: llvm/include/llvm/ADT/Triple.h:549
¶bool isX86() const
bool isX86() const
Description
Tests whether the target is x86 (32- or 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:735
¶bool isiOS() const
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:463
¶std::string merge(const llvm::Triple& Other) const
std::string merge(const llvm::Triple& Other) const
Description
Merge target triples.
Declared at: llvm/include/llvm/ADT/Triple.h:851
Parameters
- const llvm::Triple& Other
¶std::string normalize() const
std::string normalize() const
Description
Return the normalized form of this triple's string.
Declared at: llvm/include/llvm/ADT/Triple.h:290
¶static std::string normalize(llvm::StringRef Str)
static std::string normalize(llvm::StringRef Str)
Description
normalize - 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:287
Parameters
- llvm::StringRef Str
¶void setArch(llvm::Triple::ArchType Kind)
void setArch(llvm::Triple::ArchType Kind)
Description
setArch - Set the architecture (first) component of the triple to a known type.
Declared at: llvm/include/llvm/ADT/Triple.h:760
Parameters
- llvm::Triple::ArchType Kind
¶void setArchName(llvm::StringRef Str)
void setArchName(llvm::StringRef Str)
Description
setArchName - Set the architecture (first) component of the triple by name.
Declared at: llvm/include/llvm/ADT/Triple.h:782
Parameters
- llvm::StringRef Str
¶void setEnvironment(
llvm::Triple::EnvironmentType Kind)
void setEnvironment(
llvm::Triple::EnvironmentType Kind)
Description
setEnvironment - Set the environment (fourth) component of the triple to a known type.
Declared at: llvm/include/llvm/ADT/Triple.h:772
Parameters
- llvm::Triple::EnvironmentType Kind
¶void setEnvironmentName(llvm::StringRef Str)
void setEnvironmentName(llvm::StringRef Str)
Description
setEnvironmentName - Set the optional environment (fourth) component of the triple by name.
Declared at: llvm/include/llvm/ADT/Triple.h:794
Parameters
- llvm::StringRef Str
¶void setOS(llvm::Triple::OSType Kind)
void setOS(llvm::Triple::OSType Kind)
Description
setOS - Set the operating system (third) component of the triple to a known type.
Declared at: llvm/include/llvm/ADT/Triple.h:768
Parameters
- llvm::Triple::OSType Kind
¶void setOSAndEnvironmentName(llvm::StringRef Str)
void setOSAndEnvironmentName(llvm::StringRef Str)
Description
setOSAndEnvironmentName - Set the operating system and optional environment components with a single string.
Declared at: llvm/include/llvm/ADT/Triple.h:798
Parameters
- llvm::StringRef Str
¶void setOSName(llvm::StringRef Str)
void setOSName(llvm::StringRef Str)
Description
setOSName - Set the operating system (third) component of the triple by name.
Declared at: llvm/include/llvm/ADT/Triple.h:790
Parameters
- llvm::StringRef Str
¶void setObjectFormat(
llvm::Triple::ObjectFormatType Kind)
void setObjectFormat(
llvm::Triple::ObjectFormatType Kind)
Description
setObjectFormat - Set the object file format
Declared at: llvm/include/llvm/ADT/Triple.h:775
Parameters
- llvm::Triple::ObjectFormatType Kind
¶void setTriple(const llvm::Twine& Str)
void setTriple(const llvm::Twine& Str)
Description
setTriple - Set all components to the new triple \p Str.
Declared at: llvm/include/llvm/ADT/Triple.h:778
Parameters
- const llvm::Twine& Str
¶void setVendor(llvm::Triple::VendorType Kind)
void setVendor(llvm::Triple::VendorType Kind)
Description
setVendor - Set the vendor (second) component of the triple to a known type.
Declared at: llvm/include/llvm/ADT/Triple.h:764
Parameters
- llvm::Triple::VendorType Kind
¶void setVendorName(llvm::StringRef Str)
void setVendorName(llvm::StringRef Str)
Description
setVendorName - Set the vendor (second) component of the triple by name.
Declared at: llvm/include/llvm/ADT/Triple.h:786
Parameters
- llvm::StringRef Str
¶const std::string& str() const
const std::string& str() const
Description
@ } @ {
Declared at: llvm/include/llvm/ADT/Triple.h:366
¶bool supportsCOMDAT() const
bool supportsCOMDAT() const
Description
Tests whether the target supports comdat
Declared at: llvm/include/llvm/ADT/Triple.h:745