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
- 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(llvm::Triple::ArchType Kind, llvm::Triple::SubArchType SubArch = NoSubArch) 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 static llvm::VersionTuple getCanonicalVersionForOS(llvm::Triple::OSType OSKind, const llvm::VersionTuple & Version)
- public llvm::VersionTuple getDriverKitVersion() const
- public llvm::Triple::EnvironmentType getEnvironment() const
- public llvm::StringRef getEnvironmentName() const
- public static llvm::StringRef getEnvironmentTypeName(llvm::Triple::EnvironmentType Kind)
- public llvm::VersionTuple getEnvironmentVersion() const
- public llvm::Triple getLittleEndianArchVariant() const
- public bool getMacOSXVersion(llvm::VersionTuple & Version) const
- public llvm::VersionTuple getMinimumSupportedOSVersion() 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 llvm::VersionTuple getOSVersion() 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 llvm::VersionTuple getWatchOSVersion() const
- public llvm::VersionTuple getiOSVersion() const
- public bool hasDLLImportExport() const
- public bool hasDefaultDataSections() const
- public bool hasDefaultEmulatedTLS() const
- public bool hasEnvironment() const
- public bool isAArch64() const
- public bool isAArch64(int PointerWidth) const
- public bool isAMDGCN() const
- public bool isAMDGPU() 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 isArm64e() const
- public bool isArmMClass() const
- public bool isArmT32() const
- public bool isCSKY() const
- public bool isCompatibleWith(const llvm::Triple & Other) const
- public bool isDXIL() const
- public bool isDriverKit() const
- public bool isGNUEnvironment() const
- public bool isKnownWindowsMSVCEnvironment() const
- public bool isLittleEndian() const
- public bool isLoongArch() 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 isOSBinFormatGOFF() 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(const llvm::Triple & Other) const
- public bool isOSVersionLT(unsigned int Major, unsigned int Minor = 0, unsigned int Micro = 0) const
- public bool isOSWASI() const
- public bool isOSWindows() const
- public bool isOSzOS() const
- public bool isPPC() const
- public bool isPPC32() const
- public bool isPPC64() const
- public bool isPS() const
- public bool isPS4() const
- public bool isPS5() const
- public bool isRISCV() const
- public bool isSPARC() const
- public bool isSPARC32() const
- public bool isSPARC64() const
- public bool isSPIR() const
- public bool isSPIRV() const
- public bool isSimulatorEnvironment() const
- public bool isSystemZ() const
- public bool isTargetEHABICompatible() const
- public bool isTargetMachineMac() const
- public bool isThumb() const
- public bool isTvOS() const
- public bool isVE() const
- public bool isWasm() 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 isX32() 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, llvm::Triple::SubArchType SubArch = NoSubArch)
- 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:311
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: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)
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()
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
llvm::Triple get32BitArchVariant() constDescription
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
llvm::Triple get64BitArchVariant() constDescription
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
llvm::StringRef getARMCPUForArch(
llvm::StringRef Arch =
llvm::StringRef()) constDescription
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
llvm::Triple::ArchType getArch() constDescription
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
llvm::StringRef getArchName(
llvm::Triple::ArchType Kind,
llvm::Triple::SubArchType SubArch =
NoSubArch) constDescription
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
llvm::StringRef getArchName() constDescription
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)
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)
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)
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
llvm::Triple getBigEndianArchVariant() constDescription
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)
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
llvm::VersionTuple getDriverKitVersion() constDescription
Parse the version number as with getOSVersion.
Declared at: llvm/include/llvm/ADT/Triple.h:398
¶llvm::Triple::EnvironmentType getEnvironment()
const
llvm::Triple::EnvironmentType getEnvironment()
constDescription
Get the parsed environment type of this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:362
¶llvm::StringRef getEnvironmentName() const
llvm::StringRef getEnvironmentName() constDescription
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)
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
llvm::VersionTuple getEnvironmentVersion() constDescription
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
llvm::Triple getLittleEndianArchVariant() constDescription
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
bool getMacOSXVersion(
llvm::VersionTuple& Version) constDescription
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
llvm::VersionTuple getMinimumSupportedOSVersion()
constDescription
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
llvm::Triple::OSType getOS() constDescription
Get the parsed operating system type of this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:354
¶llvm::StringRef getOSAndEnvironmentName() const
llvm::StringRef getOSAndEnvironmentName() constDescription
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
unsigned int getOSMajorVersion() constDescription
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
llvm::StringRef getOSName() constDescription
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)
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
llvm::VersionTuple getOSVersion() constDescription
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
llvm::Triple::ObjectFormatType getObjectFormat()
constDescription
Get the object format for this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:371
¶llvm::Triple::SubArchType getSubArch() const
llvm::Triple::SubArchType getSubArch() constDescription
get the parsed subarchitecture type for this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:348
¶const std::string& getTriple() const
const std::string& getTriple() constDeclared at: llvm/include/llvm/ADT/Triple.h:406
¶llvm::Triple::VendorType getVendor() const
llvm::Triple::VendorType getVendor() constDescription
Get the parsed vendor type of this triple.
Declared at: llvm/include/llvm/ADT/Triple.h:351
¶llvm::StringRef getVendorName() const
llvm::StringRef getVendorName() constDescription
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)
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
llvm::VersionTuple getWatchOSVersion() constDescription
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
llvm::VersionTuple getiOSVersion() constDescription
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
bool hasDLLImportExport() constDescription
Tests if the environment supports dllimport/export annotations.
Declared at: llvm/include/llvm/ADT/Triple.h:931
¶bool hasDefaultDataSections() const
bool hasDefaultDataSections() constDescription
Tests whether the target uses -data-sections as default.
Declared at: llvm/include/llvm/ADT/Triple.h:926
¶bool hasDefaultEmulatedTLS() const
bool hasDefaultEmulatedTLS() constDescription
Tests whether the target uses emulated TLS as default.
Declared at: llvm/include/llvm/ADT/Triple.h:921
¶bool hasEnvironment() const
bool hasEnvironment() constDescription
Does this triple have the optional environment (fourth) component?
Declared at: llvm/include/llvm/ADT/Triple.h:357
¶bool isAArch64() const
bool isAArch64() constDescription
Tests whether the target is AArch64 (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:809
¶bool isAArch64(int PointerWidth) const
bool isAArch64(int PointerWidth) constDescription
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
bool isAMDGCN() constDescription
Tests whether the target is AMDGCN
Declared at: llvm/include/llvm/ADT/Triple.h:744
¶bool isAMDGPU() const
bool isAMDGPU() constDeclared at: llvm/include/llvm/ADT/Triple.h:746
¶bool isARM() const
bool isARM() constDescription
Tests whether the target is ARM (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:756
¶bool isAndroid() const
bool isAndroid() constDescription
Tests whether the target is Android
Declared at: llvm/include/llvm/ADT/Triple.h:701
¶bool isAndroidVersionLT(unsigned int Major) const
bool isAndroidVersionLT(unsigned int Major) constDeclared at: llvm/include/llvm/ADT/Triple.h:703
Parameters
- unsigned int Major
¶bool isArch16Bit() const
bool isArch16Bit() constDescription
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
bool isArch32Bit() constDescription
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
bool isArch64Bit() constDescription
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
bool isArm64e() constDescription
Tests whether the target is the Apple "arm64e" AArch64 subarch.
Declared at: llvm/include/llvm/ADT/Triple.h:904
¶bool isArmMClass() const
bool isArmMClass() constDescription
Tests whether the target is an M-class.
Declared at: llvm/include/llvm/ADT/Triple.h:794
¶bool isArmT32() const
bool isArmT32() constDescription
Tests whether the target is T32.
Declared at: llvm/include/llvm/ADT/Triple.h:774
¶bool isCSKY() const
bool isCSKY() constDeclared at: llvm/include/llvm/ADT/Triple.h:899
¶bool isCompatibleWith(
const llvm::Triple& Other) const
bool isCompatibleWith(
const llvm::Triple& Other) constDescription
Test whether target triples are compatible.
Declared at: llvm/include/llvm/ADT/Triple.h:1019
Parameters
- const llvm::Triple& Other
¶bool isDXIL() const
bool isDXIL() constDescription
Tests whether the target is DXIL.
Declared at: llvm/include/llvm/ADT/Triple.h:724
¶bool isDriverKit() const
bool isDriverKit() constDescription
Is this an Apple DriverKit triple.
Declared at: llvm/include/llvm/ADT/Triple.h:503
¶bool isGNUEnvironment() const
bool isGNUEnvironment() constDeclared at: llvm/include/llvm/ADT/Triple.h:554
¶bool isKnownWindowsMSVCEnvironment() const
bool isKnownWindowsMSVCEnvironment() constDescription
Checks if the environment is MSVC.
Declared at: llvm/include/llvm/ADT/Triple.h:576
¶bool isLittleEndian() const
bool isLittleEndian() constDescription
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
bool isLoongArch() constDescription
Tests whether the target is LoongArch (32- and 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:827
¶bool isMIPS() const
bool isMIPS() constDescription
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
bool isMIPS32() constDescription
Tests whether the target is MIPS 32-bit (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:832
¶bool isMIPS64() const
bool isMIPS64() constDescription
Tests whether the target is MIPS 64-bit (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:837
¶bool isMacCatalystEnvironment() const
bool isMacCatalystEnvironment() constDeclared at: llvm/include/llvm/ADT/Triple.h:516
¶bool isMacOSX() const
bool isMacOSX() constDescription
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
bool isMacOSXVersionLT(
unsigned int Major,
unsigned int Minor = 0,
unsigned int Micro = 0) constDescription
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
bool isMusl() constDescription
Tests whether the environment is musl-libc
Declared at: llvm/include/llvm/ADT/Triple.h:716
¶bool isNVPTX() const
bool isNVPTX() constDescription
Tests whether the target is NVPTX (32- or 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:739
¶bool isOSAIX() const
bool isOSAIX() constDescription
Tests whether the OS is AIX.
Declared at: llvm/include/llvm/ADT/Triple.h:651
¶bool isOSBinFormatCOFF() const
bool isOSBinFormatCOFF() constDescription
Tests whether the OS uses the COFF binary format.
Declared at: llvm/include/llvm/ADT/Triple.h:661
¶bool isOSBinFormatELF() const
bool isOSBinFormatELF() constDescription
Tests whether the OS uses the ELF binary format.
Declared at: llvm/include/llvm/ADT/Triple.h:656
¶bool isOSBinFormatGOFF() const
bool isOSBinFormatGOFF() constDescription
Tests whether the OS uses the GOFF binary format.
Declared at: llvm/include/llvm/ADT/Triple.h:666
¶bool isOSBinFormatMachO() const
bool isOSBinFormatMachO() constDescription
Tests whether the environment is MachO.
Declared at: llvm/include/llvm/ADT/Triple.h:669
¶bool isOSBinFormatWasm() const
bool isOSBinFormatWasm() constDescription
Tests whether the OS uses the Wasm binary format.
Declared at: llvm/include/llvm/ADT/Triple.h:674
¶bool isOSBinFormatXCOFF() const
bool isOSBinFormatXCOFF() constDescription
Tests whether the OS uses the XCOFF binary format.
Declared at: llvm/include/llvm/ADT/Triple.h:679
¶bool isOSContiki() const
bool isOSContiki() constDeclared at: llvm/include/llvm/ADT/Triple.h:561
¶bool isOSCygMing() const
bool isOSCygMing() constDescription
Tests for either Cygwin or MinGW OS
Declared at: llvm/include/llvm/ADT/Triple.h:603
¶bool isOSDarwin() const
bool isOSDarwin() constDescription
Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, or DriverKit).
Declared at: llvm/include/llvm/ADT/Triple.h:508
¶bool isOSDragonFly() const
bool isOSDragonFly() constDeclared at: llvm/include/llvm/ADT/Triple.h:542
¶bool isOSEmscripten() const
bool isOSEmscripten() constDescription
Tests whether the OS is Emscripten.
Declared at: llvm/include/llvm/ADT/Triple.h:639
¶bool isOSFreeBSD() const
bool isOSFreeBSD() constDeclared at: llvm/include/llvm/ADT/Triple.h:534
¶bool isOSFuchsia() const
bool isOSFuchsia() constDeclared at: llvm/include/llvm/ADT/Triple.h:538
¶bool isOSGlibc() const
bool isOSGlibc() constDescription
Tests whether the OS uses glibc.
Declared at: llvm/include/llvm/ADT/Triple.h:644
¶bool isOSHaiku() const
bool isOSHaiku() constDescription
Tests whether the OS is Haiku.
Declared at: llvm/include/llvm/ADT/Triple.h:566
¶bool isOSHurd() const
bool isOSHurd() constDescription
Tests whether the OS is Hurd.
Declared at: llvm/include/llvm/ADT/Triple.h:629
¶bool isOSIAMCU() const
bool isOSIAMCU() constDeclared at: llvm/include/llvm/ADT/Triple.h:548
¶bool isOSKFreeBSD() const
bool isOSKFreeBSD() constDescription
Tests whether the OS is kFreeBSD.
Declared at: llvm/include/llvm/ADT/Triple.h:624
¶bool isOSLinux() const
bool isOSLinux() constDescription
Tests whether the OS is Linux.
Declared at: llvm/include/llvm/ADT/Triple.h:619
¶bool isOSMSVCRT() const
bool isOSMSVCRT() constDescription
Is this a "Windows" OS targeting a "MSVCRT.dll" environment.
Declared at: llvm/include/llvm/ADT/Triple.h:608
¶bool isOSNaCl() const
bool isOSNaCl() constDescription
Tests whether the OS is NaCl (Native Client)
Declared at: llvm/include/llvm/ADT/Triple.h:614
¶bool isOSNetBSD() const
bool isOSNetBSD() constDeclared at: llvm/include/llvm/ADT/Triple.h:526
¶bool isOSOpenBSD() const
bool isOSOpenBSD() constDeclared at: llvm/include/llvm/ADT/Triple.h:530
¶bool isOSSolaris() const
bool isOSSolaris() constDeclared at: llvm/include/llvm/ADT/Triple.h:544
¶bool isOSUnknown() const
bool isOSUnknown() constDeclared at: llvm/include/llvm/ADT/Triple.h:552
¶bool isOSVersionLT(
const llvm::Triple& Other) const
bool isOSVersionLT(
const llvm::Triple& Other) constDeclared 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
bool isOSVersionLT(unsigned int Major,
unsigned int Minor = 0,
unsigned int Micro = 0) constDescription
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
bool isOSWASI() constDescription
Tests whether the OS is WASI.
Declared at: llvm/include/llvm/ADT/Triple.h:634
¶bool isOSWindows() const
bool isOSWindows() constDescription
Tests whether the OS is Windows.
Declared at: llvm/include/llvm/ADT/Triple.h:571
¶bool isOSzOS() const
bool isOSzOS() constDeclared at: llvm/include/llvm/ADT/Triple.h:505
¶bool isPPC() const
bool isPPC() constDescription
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
bool isPPC32() constDescription
Tests whether the target is 32-bit PowerPC (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:853
¶bool isPPC64() const
bool isPPC64() constDescription
Tests whether the target is 64-bit PowerPC (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:858
¶bool isPS() const
bool isPS() constDescription
Tests whether the target is the PS4 or PS5 platform.
Declared at: llvm/include/llvm/ADT/Triple.h:698
¶bool isPS4() const
bool isPS4() constDescription
Tests whether the target is the PS4 platform.
Declared at: llvm/include/llvm/ADT/Triple.h:684
¶bool isPS5() const
bool isPS5() constDescription
Tests whether the target is the PS5 platform.
Declared at: llvm/include/llvm/ADT/Triple.h:691
¶bool isRISCV() const
bool isRISCV() constDescription
Tests whether the target is RISC-V (32- and 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:863
¶bool isSPARC() const
bool isSPARC() constDescription
Tests whether the target is SPARC.
Declared at: llvm/include/llvm/ADT/Triple.h:876
¶bool isSPARC32() const
bool isSPARC32() constDescription
Tests whether the target is 32-bit SPARC (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:868
¶bool isSPARC64() const
bool isSPARC64() constDescription
Tests whether the target is 64-bit SPARC (big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:873
¶bool isSPIR() const
bool isSPIR() constDescription
Tests whether the target is SPIR (32- or 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:729
¶bool isSPIRV() const
bool isSPIRV() constDescription
Tests whether the target is SPIR-V (32/64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:734
¶bool isSimulatorEnvironment() const
bool isSimulatorEnvironment() constDeclared at: llvm/include/llvm/ADT/Triple.h:512
¶bool isSystemZ() const
bool isSystemZ() constDescription
Tests whether the target is SystemZ.
Declared at: llvm/include/llvm/ADT/Triple.h:879
¶bool isTargetEHABICompatible() const
bool isTargetEHABICompatible() constDescription
Tests whether the target supports the EHABI exception handling standard.
Declared at: llvm/include/llvm/ADT/Triple.h:762
¶bool isTargetMachineMac() const
bool isTargetMachineMac() constDescription
Returns true for targets that run on a macOS machine.
Declared at: llvm/include/llvm/ADT/Triple.h:521
¶bool isThumb() const
bool isThumb() constDescription
Tests whether the target is Thumb (little and big endian).
Declared at: llvm/include/llvm/ADT/Triple.h:751
¶bool isTvOS() const
bool isTvOS() constDescription
Is this an Apple tvOS triple.
Declared at: llvm/include/llvm/ADT/Triple.h:489
¶bool isVE() const
bool isVE() constDescription
Tests whether the target is VE
Declared at: llvm/include/llvm/ADT/Triple.h:889
¶bool isWasm() const
bool isWasm() constDescription
Tests whether the target is wasm (32- and 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:894
¶bool isWatchABI() const
bool isWatchABI() constDeclared at: llvm/include/llvm/ADT/Triple.h:498
¶bool isWatchOS() const
bool isWatchOS() constDescription
Is this an Apple watchOS triple.
Declared at: llvm/include/llvm/ADT/Triple.h:494
¶bool isWindowsCoreCLREnvironment() const
bool isWindowsCoreCLREnvironment() constDeclared at: llvm/include/llvm/ADT/Triple.h:586
¶bool isWindowsCygwinEnvironment() const
bool isWindowsCygwinEnvironment() constDeclared at: llvm/include/llvm/ADT/Triple.h:594
¶bool isWindowsGNUEnvironment() const
bool isWindowsGNUEnvironment() constDeclared at: llvm/include/llvm/ADT/Triple.h:598
¶bool isWindowsItaniumEnvironment() const
bool isWindowsItaniumEnvironment() constDeclared at: llvm/include/llvm/ADT/Triple.h:590
¶bool isWindowsMSVCEnvironment() const
bool isWindowsMSVCEnvironment() constDescription
Checks if the environment could be MSVC.
Declared at: llvm/include/llvm/ADT/Triple.h:581
¶bool isX32() const
bool isX32() constDescription
Tests whether the target is X32.
Declared at: llvm/include/llvm/ADT/Triple.h:910
¶bool isX86() const
bool isX86() constDescription
Tests whether the target is x86 (32- or 64-bit).
Declared at: llvm/include/llvm/ADT/Triple.h:884
¶bool isiOS() const
bool isiOS() constDescription
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
std::string merge(const llvm::Triple& Other) constDescription
Merge target triples.
Declared at: llvm/include/llvm/ADT/Triple.h:1022
Parameters
- const llvm::Triple& Other
¶std::string normalize() const
std::string normalize() constDescription
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
const std::string& str() constDescription
@ } @ {
Declared at: llvm/include/llvm/ADT/Triple.h:404
¶bool supportsCOMDAT() const
bool supportsCOMDAT() constDescription
Tests whether the target supports comdat
Declared at: llvm/include/llvm/ADT/Triple.h:916