LLVM 20.0.0git
|
Triple - Helper class for working with autoconf configuration names. More...
#include "llvm/TargetParser/Triple.h"
Public Member Functions | |
Constructors | |
Triple ()=default | |
Default constructor is the same as an empty string and leaves all triple fields unknown. | |
Triple (const Twine &Str) | |
Construct a triple from the string representation provided. | |
Triple (const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr) | |
Construct a triple from string representations of the architecture, vendor, and OS. | |
Triple (const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr, const Twine &EnvironmentStr) | |
Construct a triple from string representations of the architecture, vendor, OS, and environment. | |
bool | operator== (const Triple &Other) const |
bool | operator!= (const Triple &Other) const |
Typed Component Access | |
ArchType | getArch () const |
Get the parsed architecture type of this triple. | |
SubArchType | getSubArch () const |
get the parsed subarchitecture type for this triple. | |
VendorType | getVendor () const |
Get the parsed vendor type of this triple. | |
OSType | getOS () const |
Get the parsed operating system type of this triple. | |
bool | hasEnvironment () const |
Does this triple have the optional environment (fourth) component? | |
EnvironmentType | getEnvironment () const |
Get the parsed environment type of this triple. | |
VersionTuple | getEnvironmentVersion () const |
Parse the version number from the OS name component of the triple, if present. | |
ObjectFormatType | getObjectFormat () const |
Get the object format for this triple. | |
VersionTuple | getOSVersion () const |
Parse the version number from the OS name component of the triple, if present. | |
unsigned | getOSMajorVersion () const |
Return just the major version number, this is specialized because it is a common query. | |
bool | getMacOSXVersion (VersionTuple &Version) const |
Parse the version number as with getOSVersion and then translate generic "darwin" versions to the corresponding OS X versions. | |
VersionTuple | getiOSVersion () const |
Parse the version number as with getOSVersion. | |
VersionTuple | getWatchOSVersion () const |
Parse the version number as with getOSVersion. | |
VersionTuple | getDriverKitVersion () const |
Parse the version number as with getOSVersion. | |
VersionTuple | getVulkanVersion () const |
Parse the Vulkan version number from the OSVersion and SPIR-V version (SubArch). | |
VersionTuple | getDXILVersion () const |
Parse the DXIL version number from the OSVersion and DXIL version (SubArch). | |
Direct Component Access | |
const std::string & | str () const |
const std::string & | getTriple () const |
StringRef | getArchName () const |
Get the architecture (first) component of the triple. | |
StringRef | getVendorName () const |
Get the vendor (second) component of the triple. | |
StringRef | getOSName () const |
Get the operating system (third) component of the triple. | |
StringRef | getEnvironmentName () const |
Get the optional environment (fourth) component of the triple, or "" if empty. | |
StringRef | getOSAndEnvironmentName () const |
Get the operating system and optional environment components as a single string (separated by a '-' if the environment component is present). | |
StringRef | getEnvironmentVersionString () const |
Get the version component of the environment component as a single string (the version after the environment). | |
Mutators | |
void | setArch (ArchType Kind, SubArchType SubArch=NoSubArch) |
Set the architecture (first) component of the triple to a known type. | |
void | setVendor (VendorType Kind) |
Set the vendor (second) component of the triple to a known type. | |
void | setOS (OSType Kind) |
Set the operating system (third) component of the triple to a known type. | |
void | setEnvironment (EnvironmentType Kind) |
Set the environment (fourth) component of the triple to a known type. | |
void | setObjectFormat (ObjectFormatType Kind) |
Set the object file format. | |
void | setTriple (const Twine &Str) |
Set all components to the new triple Str . | |
void | setArchName (StringRef Str) |
Set the architecture (first) component of the triple by name. | |
void | setVendorName (StringRef Str) |
Set the vendor (second) component of the triple by name. | |
void | setOSName (StringRef Str) |
Set the operating system (third) component of the triple by name. | |
void | setEnvironmentName (StringRef Str) |
Set the optional environment (fourth) component of the triple by name. | |
void | setOSAndEnvironmentName (StringRef Str) |
Set the operating system and optional environment components with a single string. | |
Helpers to build variants of a particular triple. | |
llvm::Triple | get32BitArchVariant () const |
Form a triple with a 32-bit variant of the current architecture. | |
llvm::Triple | get64BitArchVariant () const |
Form a triple with a 64-bit variant of the current architecture. | |
llvm::Triple | getBigEndianArchVariant () const |
Form a triple with a big endian variant of the current architecture. | |
llvm::Triple | getLittleEndianArchVariant () const |
Form a triple with a little endian variant of the current architecture. | |
bool | isLittleEndian () const |
Tests whether the target triple is little endian. | |
bool | isCompatibleWith (const Triple &Other) const |
Test whether target triples are compatible. | |
std::string | merge (const Triple &Other) const |
Merge target triples. | |
VersionTuple | getMinimumSupportedOSVersion () const |
Some platforms have different minimum supported OS versions that varies by the architecture specified in the triple. | |
Static Public Member Functions | |
static VersionTuple | getCanonicalVersionForOS (OSType OSKind, const VersionTuple &Version) |
Returns a canonicalized OS version number for the specified OS. | |
Static helpers for IDs. | |
static StringRef | getArchTypeName (ArchType Kind) |
Get the canonical name for the Kind architecture. | |
static StringRef | getArchName (ArchType Kind, SubArchType SubArch=NoSubArch) |
Get the architecture name based on Kind and SubArch . | |
static StringRef | getArchTypePrefix (ArchType Kind) |
Get the "prefix" canonical name for the Kind architecture. | |
static StringRef | getVendorTypeName (VendorType Kind) |
Get the canonical name for the Kind vendor. | |
static StringRef | getOSTypeName (OSType Kind) |
Get the canonical name for the Kind operating system. | |
static StringRef | getEnvironmentTypeName (EnvironmentType Kind) |
Get the canonical name for the Kind environment. | |
static StringRef | getObjectFormatTypeName (ObjectFormatType ObjectFormat) |
Get the name for the Object format. | |
Static helpers for converting alternate architecture names. | |
static ArchType | getArchTypeForLLVMName (StringRef Str) |
The canonical type for the given LLVM architecture name (e.g., "x86"). | |
Normalization | |
std::string | normalize () const |
Return the normalized form of this triple's string. | |
static std::string | normalize (StringRef Str) |
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). | |
Convenience Predicates | |
unsigned | getArchPointerBitWidth () const |
Returns the pointer width of this architecture. | |
bool | isArch64Bit () const |
Test whether the architecture is 64-bit. | |
bool | isArch32Bit () const |
Test whether the architecture is 32-bit. | |
bool | isArch16Bit () const |
Test whether the architecture is 16-bit. | |
bool | isOSVersionLT (unsigned Major, unsigned Minor=0, unsigned Micro=0) const |
Helper function for doing comparisons against version numbers included in the target triple. | |
bool | isOSVersionLT (const Triple &Other) const |
bool | isMacOSXVersionLT (unsigned Major, unsigned Minor=0, unsigned Micro=0) const |
Comparison function for checking OS X version compatibility, which handles supporting skewed version numbering schemes used by the "darwin" triples. | |
bool | isMacOSX () const |
Is this a Mac OS X triple. | |
bool | isiOS () const |
Is this an iOS triple. | |
bool | isTvOS () const |
Is this an Apple tvOS triple. | |
bool | isWatchOS () const |
Is this an Apple watchOS triple. | |
bool | isWatchABI () const |
bool | isXROS () const |
Is this an Apple XROS triple. | |
bool | isDriverKit () const |
Is this an Apple DriverKit triple. | |
bool | isOSzOS () const |
bool | isOSDarwin () const |
Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, XROS, or DriverKit). | |
bool | isSimulatorEnvironment () const |
bool | isMacCatalystEnvironment () const |
bool | isTargetMachineMac () const |
Returns true for targets that run on a macOS machine. | |
bool | isOSNetBSD () const |
bool | isOSOpenBSD () const |
bool | isOSFreeBSD () const |
bool | isOSFuchsia () const |
bool | isOSDragonFly () const |
bool | isOSSolaris () const |
bool | isOSIAMCU () const |
bool | isOSUnknown () const |
bool | isGNUEnvironment () const |
bool | isOSHaiku () const |
Tests whether the OS is Haiku. | |
bool | isUEFI () const |
Tests whether the OS is UEFI. | |
bool | isOSWindows () const |
Tests whether the OS is Windows. | |
bool | isKnownWindowsMSVCEnvironment () const |
Checks if the environment is MSVC. | |
bool | isWindowsMSVCEnvironment () const |
Checks if the environment could be MSVC. | |
bool | isWindowsArm64EC () const |
bool | isWindowsCoreCLREnvironment () const |
bool | isWindowsItaniumEnvironment () const |
bool | isWindowsCygwinEnvironment () const |
bool | isWindowsGNUEnvironment () const |
bool | isOSCygMing () const |
Tests for either Cygwin or MinGW OS. | |
bool | isOSMSVCRT () const |
Is this a "Windows" OS targeting a "MSVCRT.dll" environment. | |
bool | isOSNaCl () const |
Tests whether the OS is NaCl (Native Client) | |
bool | isOSLinux () const |
Tests whether the OS is Linux. | |
bool | isOSKFreeBSD () const |
Tests whether the OS is kFreeBSD. | |
bool | isOSHurd () const |
Tests whether the OS is Hurd. | |
bool | isOSWASI () const |
Tests whether the OS is WASI. | |
bool | isOSEmscripten () const |
Tests whether the OS is Emscripten. | |
bool | isOSGlibc () const |
Tests whether the OS uses glibc. | |
bool | isOSAIX () const |
Tests whether the OS is AIX. | |
bool | isOSSerenity () const |
bool | isOSBinFormatELF () const |
Tests whether the OS uses the ELF binary format. | |
bool | isOSBinFormatCOFF () const |
Tests whether the OS uses the COFF binary format. | |
bool | isOSBinFormatGOFF () const |
Tests whether the OS uses the GOFF binary format. | |
bool | isOSBinFormatMachO () const |
Tests whether the environment is MachO. | |
bool | isOSBinFormatWasm () const |
Tests whether the OS uses the Wasm binary format. | |
bool | isOSBinFormatXCOFF () const |
Tests whether the OS uses the XCOFF binary format. | |
bool | isOSBinFormatDXContainer () const |
Tests whether the OS uses the DXContainer binary format. | |
bool | isPS4 () const |
Tests whether the target is the PS4 platform. | |
bool | isPS5 () const |
Tests whether the target is the PS5 platform. | |
bool | isPS () const |
Tests whether the target is the PS4 or PS5 platform. | |
bool | isAndroid () const |
Tests whether the target is Android. | |
bool | isAndroidVersionLT (unsigned Major) const |
bool | isMusl () const |
Tests whether the environment is musl-libc. | |
bool | isOHOSFamily () const |
Tests whether the target is OHOS LiteOS default enviroment is also OHOS, but omited on triple. | |
bool | isOpenHOS () const |
bool | isOSLiteOS () const |
bool | isDXIL () const |
Tests whether the target is DXIL. | |
bool | isShaderModelOS () const |
bool | isVulkanOS () const |
bool | isShaderStageEnvironment () const |
bool | isSPIR () const |
Tests whether the target is SPIR (32- or 64-bit). | |
bool | isSPIRV () const |
Tests whether the target is SPIR-V (32/64-bit/Logical). | |
bool | isSPIRVLogical () const |
Tests whether the target is SPIR-V Logical. | |
bool | isNVPTX () const |
Tests whether the target is NVPTX (32- or 64-bit). | |
bool | isAMDGCN () const |
Tests whether the target is AMDGCN. | |
bool | isAMDGPU () const |
bool | isThumb () const |
Tests whether the target is Thumb (little and big endian). | |
bool | isARM () const |
Tests whether the target is ARM (little and big endian). | |
bool | isTargetEHABICompatible () const |
Tests whether the target supports the EHABI exception handling standard. | |
bool | isArmT32 () const |
Tests whether the target is T32. | |
bool | isArmMClass () const |
Tests whether the target is an M-class. | |
bool | isAArch64 () const |
Tests whether the target is AArch64 (little and big endian). | |
bool | isAArch64 (int PointerWidth) const |
Tests whether the target is AArch64 and pointers are the size specified by PointerWidth . | |
bool | isLoongArch32 () const |
Tests whether the target is 32-bit LoongArch. | |
bool | isLoongArch64 () const |
Tests whether the target is 64-bit LoongArch. | |
bool | isLoongArch () const |
Tests whether the target is LoongArch (32- and 64-bit). | |
bool | isMIPS32 () const |
Tests whether the target is MIPS 32-bit (little and big endian). | |
bool | isMIPS64 () const |
Tests whether the target is MIPS 64-bit (little and big endian). | |
bool | isMIPS () const |
Tests whether the target is MIPS (little and big endian, 32- or 64-bit). | |
bool | isPPC () const |
Tests whether the target is PowerPC (32- or 64-bit LE or BE). | |
bool | isPPC32 () const |
Tests whether the target is 32-bit PowerPC (little and big endian). | |
bool | isPPC64 () const |
Tests whether the target is 64-bit PowerPC (little and big endian). | |
bool | isPPC64ELFv2ABI () const |
Tests whether the target 64-bit PowerPC big endian ABI is ELFv2. | |
bool | isPPC32SecurePlt () const |
Tests whether the target 32-bit PowerPC uses Secure PLT. | |
bool | isRISCV32 () const |
Tests whether the target is 32-bit RISC-V. | |
bool | isRISCV64 () const |
Tests whether the target is 64-bit RISC-V. | |
bool | isRISCV () const |
Tests whether the target is RISC-V (32- and 64-bit). | |
bool | isSPARC32 () const |
Tests whether the target is 32-bit SPARC (little and big endian). | |
bool | isSPARC64 () const |
Tests whether the target is 64-bit SPARC (big endian). | |
bool | isSPARC () const |
Tests whether the target is SPARC. | |
bool | isSystemZ () const |
Tests whether the target is SystemZ. | |
bool | isX86 () const |
Tests whether the target is x86 (32- or 64-bit). | |
bool | isVE () const |
Tests whether the target is VE. | |
bool | isWasm () const |
Tests whether the target is wasm (32- and 64-bit). | |
bool | isCSKY () const |
bool | isArm64e () const |
Tests whether the target is the Apple "arm64e" AArch64 subarch. | |
bool | isABIN32 () const |
bool | isX32 () const |
Tests whether the target is X32. | |
bool | isBPF () const |
Tests whether the target is eBPF. | |
bool | isTime64ABI () const |
Tests if the target forces 64-bit time_t on a 32-bit architecture. | |
bool | isHardFloatABI () const |
Tests if the target forces hardfloat. | |
bool | supportsCOMDAT () const |
Tests whether the target supports comdat. | |
bool | hasDefaultEmulatedTLS () const |
Tests whether the target uses emulated TLS as default. | |
bool | hasDefaultTLSDESC () const |
True if the target supports both general-dynamic and TLSDESC, and TLSDESC is enabled by default. | |
bool | hasDefaultDataSections () const |
Tests whether the target uses -data-sections as default. | |
bool | hasDLLImportExport () const |
Tests if the environment supports dllimport/export annotations. | |
static unsigned | getArchPointerBitWidth (llvm::Triple::ArchType Arch) |
Returns the pointer width of this architecture. | |
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.
enum llvm::Triple::OSType |
|
default |
Default constructor is the same as an empty string and leaves all triple fields unknown.
Referenced by setArchName(), and setTriple().
Construct a triple from the string representation provided.
This stores the string representation and parses the various pieces into enum members.
Definition at line 995 of file Triple.cpp.
References llvm::StringSwitch< T, R >::Cases(), llvm::StringSwitch< T, R >::Default(), getDefaultFormat(), GNU, GNUABI64, GNUABIN32, parseArch(), parseEnvironment(), parseFormat(), parseOS(), parseSubArch(), parseVendor(), llvm::SmallVectorBase< Size_T >::size(), llvm::StringRef::split(), llvm::StringSwitch< T, R >::StartsWith(), UnknownEnvironment, and UnknownObjectFormat.
Construct a triple from string representations of the architecture, vendor, and OS.
This joins each argument into a canonical string representation and parses them into enum members. It leaves the environment unknown and omits it from the string representation.
Definition at line 1035 of file Triple.cpp.
References getDefaultFormat().
Triple::Triple | ( | const Twine & | ArchStr, |
const Twine & | VendorStr, | ||
const Twine & | OSStr, | ||
const Twine & | EnvironmentStr | ||
) |
Construct a triple from string representations of the architecture, vendor, OS, and environment.
This joins each argument into a canonical string representation and parses them into enum members.
Definition at line 1050 of file Triple.cpp.
References getDefaultFormat(), and UnknownObjectFormat.
Triple Triple::get32BitArchVariant | ( | ) | const |
Form a triple with a 32-bit variant of the current architecture.
This can be used to move across "families" of architectures where useful.
Definition at line 1693 of file Triple.cpp.
References aarch64, aarch64_32, aarch64_be, amdgcn, amdil, amdil64, arc, arm, armeb, avr, bpfeb, bpfel, csky, dxil, getArch(), getSubArch(), hexagon, hsail, hsail64, kalimba, lanai, loongarch32, loongarch64, m68k, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, ppcle, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparc, sparcel, sparcv9, spir, spir64, spirv, spirv32, spirv64, systemz, tce, tcele, thumb, thumbeb, UnknownArch, ve, wasm32, wasm64, x86, x86_64, xcore, and xtensa.
Referenced by llvm::sys::getProcessTriple().
Triple Triple::get64BitArchVariant | ( | ) | const |
Form a triple with a 64-bit variant of the current architecture.
This can be used to move across "families" of architectures where useful.
Definition at line 1772 of file Triple.cpp.
References aarch64, aarch64_32, aarch64_be, amdgcn, amdil, amdil64, arc, arm, armeb, avr, bpfeb, bpfel, csky, dxil, getArch(), getSubArch(), hexagon, hsail, hsail64, kalimba, lanai, loongarch32, loongarch64, m68k, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, ppcle, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparc, sparcel, sparcv9, spir, spir64, spirv, spirv32, spirv64, systemz, tce, tcele, thumb, thumbeb, UnknownArch, ve, wasm32, wasm64, x86, x86_64, xcore, and xtensa.
Referenced by llvm::sys::getProcessTriple().
|
inline |
Get the parsed architecture type of this triple.
Definition at line 383 of file Triple.h.
Referenced by llvm::AMDGPUPassConfig::addCodeGenPrepare(), llvm::AMDGPUPassConfig::addIRPasses(), llvm::TargetLibraryInfoImpl::addVectorizableFunctionsFromVecLib(), adjustInlineAsm(), llvm::ARMELFMCAsmInfo::ARMELFMCAsmInfo(), llvm::ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(), llvm::CodeViewDebug::beginFunctionImpl(), llvm::CodeViewDebug::beginModule(), createAArch64MCAsmInfo(), llvm::orc::SimpleMachOHeaderMU::createHeaderBlock(), createPPCMCAsmInfo(), CreateVarArgHelper(), createX86MCAsmInfo(), emplace(), llvm::CodeViewDebug::endFunctionImpl(), llvm::X86_MC::X86MCInstrAnalysis::findPltEntries(), llvm::AMDGPUSubtarget::get(), get32BitArchVariant(), get64BitArchVariant(), getArchPointerBitWidth(), getBigEndianArchVariant(), llvm::SubtargetFeatures::getDefaultSubtargetFeatures(), getDXILVersion(), getiOSVersion(), getLittleEndianArchVariant(), llvm::AMDGPUMCAsmInfo::getMaxInstLength(), llvm::AMDGPU::IsaInfo::getMaxWorkGroupsPerCU(), llvm::AMDGPU::getMCReg(), getMinimumSupportedOSVersion(), llvm::memtag::getPC(), llvm::object::ELFObjectFileBase::getPltEntries(), getShadowMapping(), llvm::getSubDirectoryPath(), llvm::lto::getThinLTODefaultCPU(), getVulkanVersion(), llvm::TargetLoweringObjectFileELF::Initialize(), isAArch64(), isAMDGCN(), isAMDGPU(), isArch16Bit(), isArch32Bit(), isArch64Bit(), isARM(), isArm64e(), isBPF(), isCompatibleWith(), isCSKY(), isDXIL(), llvm::AMDGPUSubtarget::isGCN(), isLittleEndian(), isLoongArch32(), isLoongArch64(), isMIPS32(), isMIPS64(), isNVPTX(), llvm::SPIRVSubtarget::isOpenCLEnv(), isPPC(), isPPC32(), isPPC32SecurePlt(), isPPC64(), isPPC64ELFv2ABI(), isPS4(), isPS5(), isRISCV32(), isRISCV64(), isSPARC32(), isSPARC64(), isSPIR(), isSPIRV(), isSPIRVLogical(), isSystemZ(), isThumb(), isVE(), llvm::SPIRVSubtarget::isVulkanEnv(), isWasm(), isWindowsArm64EC(), isX86(), llvm::TargetRegistry::lookupTarget(), llvm::MipsTargetELFStreamer::MipsTargetELFStreamer(), llvm::NVPTXMCAsmInfo::NVPTXMCAsmInfo(), llvm::omp::OMPContext::OMPContext(), llvm::ifs::parseTriple(), llvm::orc::LLJITBuilderState::prepareForConstruction(), runImpl(), llvm::AMDGPUDAGToDAGISel::SelectBuildVector(), llvm::FastISel::selectXRayCustomEvent(), llvm::FastISel::selectXRayTypedEvent(), llvm::setGlobalVariableLargeSection(), llvm::BasicTTIImplBase< T >::shouldBuildRelLookupTables(), llvm::TargetLoweringObjectFileCOFF::shouldPutJumpTableInFunctionSection(), llvm::SparcELFMCAsmInfo::SparcELFMCAsmInfo(), llvm::X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(), and llvm::X86MCAsmInfoMicrosoft::X86MCAsmInfoMicrosoft().
StringRef Triple::getArchName | ( | ) | const |
Get the architecture (first) component of the triple.
Definition at line 1321 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by llvm::AArch64FrameLowering::emitPrologue(), llvm::ARM::getARMCPUForArch(), getDXILArchNameFromShaderModel(), getDXILVersion(), setArch(), setEnvironmentName(), setOSAndEnvironmentName(), setOSName(), setVendorName(), and llvm::ThinLTOCodeGenerator::writeGeneratedObject().
|
static |
Get the architecture name based on Kind
and SubArch
.
Definition at line 92 of file Triple.cpp.
References aarch64, AArch64SubArch_arm64e, AArch64SubArch_arm64ec, dxil, DXILSubArch_v1_0, DXILSubArch_v1_1, DXILSubArch_v1_2, DXILSubArch_v1_3, DXILSubArch_v1_4, DXILSubArch_v1_5, DXILSubArch_v1_6, DXILSubArch_v1_7, DXILSubArch_v1_8, getArchTypeName(), mips, mips64, mips64el, mipsel, MipsSubArch_r6, and NoSubArch.
|
inline |
Returns the pointer width of this architecture.
Definition at line 485 of file Triple.h.
References getArch(), and getArchPointerBitWidth().
Referenced by getArchPointerBitWidth(), isArch16Bit(), isArch32Bit(), isArch64Bit(), and llvm::jitlink::LinkGraph::LinkGraph().
|
static |
Returns the pointer width of this architecture.
Definition at line 1608 of file Triple.cpp.
References aarch64, aarch64_32, aarch64_be, amdgcn, amdil, amdil64, arc, arm, armeb, avr, bpfeb, bpfel, csky, dxil, hexagon, hsail, hsail64, kalimba, lanai, llvm_unreachable, loongarch32, loongarch64, m68k, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, ppcle, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparc, sparcel, sparcv9, spir, spir64, spirv, spirv32, spirv64, systemz, tce, tcele, thumb, thumbeb, UnknownArch, ve, wasm32, wasm64, x86, x86_64, xcore, and xtensa.
|
static |
The canonical type for the given LLVM architecture name (e.g., "x86").
Definition at line 402 of file Triple.cpp.
References aarch64, aarch64_32, aarch64_be, amdgcn, amdil, amdil64, arc, arm, armeb, avr, llvm::StringSwitch< T, R >::Case(), csky, llvm::StringSwitch< T, R >::Default(), dxil, hexagon, hsail, hsail64, kalimba, lanai, loongarch32, loongarch64, m68k, mips, mips64, mips64el, mipsel, msp430, Name, nvptx, nvptx64, parseBPFArch(), ppc, ppc64, ppc64le, ppcle, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparc, sparcel, sparcv9, spir, spir64, spirv, spirv32, spirv64, llvm::StringSwitch< T, R >::StartsWith(), systemz, tce, tcele, thumb, thumbeb, UnknownArch, ve, wasm32, wasm64, x86, x86_64, xcore, and xtensa.
Referenced by llvm::TargetRegistry::lookupTarget(), and llvm::EngineBuilder::selectTarget().
Get the canonical name for the Kind
architecture.
Definition at line 24 of file Triple.cpp.
References aarch64, aarch64_32, aarch64_be, amdgcn, amdil, amdil64, arc, arm, armeb, avr, bpfeb, bpfel, csky, dxil, hexagon, hsail, hsail64, kalimba, lanai, llvm_unreachable, loongarch32, loongarch64, m68k, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, ppcle, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparc, sparcel, sparcv9, spir, spir64, spirv, spirv32, spirv64, systemz, tce, tcele, thumb, thumbeb, UnknownArch, ve, wasm32, wasm64, x86, x86_64, xcore, and xtensa.
Referenced by llvm::orc::checkMachORelocatableObject(), and getArchName().
Get the "prefix" canonical name for the Kind
architecture.
This is the prefix used by the architecture specific builtins, and is suitable for passing to
Definition at line 147 of file Triple.cpp.
References aarch64, aarch64_32, aarch64_be, amdgcn, amdil, amdil64, arc, arm, armeb, avr, bpfeb, bpfel, csky, dxil, hexagon, hsail, hsail64, kalimba, lanai, loongarch32, loongarch64, m68k, mips, mips64, mips64el, mipsel, nvptx, nvptx64, ppc, ppc64, ppc64le, ppcle, r600, riscv32, riscv64, shave, sparc, sparcel, sparcv9, spir, spir64, spirv, spirv32, spirv64, systemz, thumb, thumbeb, ve, wasm32, wasm64, x86, x86_64, xcore, and xtensa.
Triple Triple::getBigEndianArchVariant | ( | ) | const |
Form a triple with a big endian variant of the current architecture.
This can be used to move across "families" of architectures where useful.
Definition at line 1851 of file Triple.cpp.
References aarch64, aarch64_be, amdgcn, amdil, amdil64, arm, avr, bpfeb, bpfel, csky, dxil, getArch(), getSubArch(), hexagon, hsail, hsail64, isLittleEndian(), kalimba, llvm_unreachable, loongarch32, loongarch64, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, ppcle, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparc, sparcel, spir, spir64, spirv, spirv32, spirv64, tce, tcele, thumb, UnknownArch, ve, wasm32, wasm64, x86, x86_64, xcore, and xtensa.
|
static |
Returns a canonicalized OS version number for the specified OS.
Definition at line 2090 of file Triple.cpp.
References MacOSX, and llvm::Version.
VersionTuple Triple::getDriverKitVersion | ( | ) | const |
Parse the version number as with getOSVersion.
Definition at line 1494 of file Triple.cpp.
References DriverKit, getOS(), getOSVersion(), llvm_unreachable, and llvm::Version.
VersionTuple Triple::getDXILVersion | ( | ) | const |
Parse the DXIL version number from the OSVersion and DXIL version (SubArch).
This should only be called with DXIL triples.
Definition at line 1531 of file Triple.cpp.
References llvm::StringRef::consume_front(), dxil, getArch(), getArchName(), getDXILArchNameFromShaderModel(), getOS(), getOSName(), getSubArch(), llvm_unreachable, NoSubArch, parseVersionFromName(), and ShaderModel.
|
inline |
Get the parsed environment type of this triple.
Definition at line 400 of file Triple.h.
Referenced by llvm::ARMBaseTargetMachine::ARMBaseTargetMachine(), llvm::createAArch64beAsmBackend(), llvm::createAArch64leAsmBackend(), emplace(), llvm::ARM::getARMCPUForArch(), getEnvironmentVersionString(), llvm::TargetLoweringObjectFileELF::Initialize(), isAArch64(), isABIN32(), isAndroid(), isCompatibleWith(), llvm::HexagonSubtarget::isEnvironmentMusl(), isGNUEnvironment(), isHardFloatABI(), isKnownWindowsMSVCEnvironment(), isMacCatalystEnvironment(), isMusl(), isOpenHOS(), isShaderStageEnvironment(), isSimulatorEnvironment(), llvm::ARMSubtarget::isTargetAEABI(), isTargetEHABICompatible(), llvm::ARMSubtarget::isTargetGNUAEABI(), llvm::ARMBaseTargetMachine::isTargetHardFloat(), llvm::AArch64Subtarget::isTargetILP32(), llvm::ARMSubtarget::isTargetMuslAEABI(), isTime64ABI(), isWindowsCoreCLREnvironment(), isWindowsCygwinEnvironment(), isWindowsGNUEnvironment(), isWindowsItaniumEnvironment(), isWindowsMSVCEnvironment(), and isX32().
StringRef Triple::getEnvironmentName | ( | ) | const |
Get the optional environment (fourth) component of the triple, or "" if empty.
Definition at line 1336 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by getEnvironmentVersionString(), hasEnvironment(), and setOSName().
|
static |
Get the canonical name for the Kind
environment.
Definition at line 307 of file Triple.cpp.
References Amplification, Android, AnyHit, Callable, ClosestHit, CODE16, Compute, CoreCLR, Cygnus, Domain, EABI, EABIHF, Geometry, GNU, GNUABI64, GNUABIN32, GNUEABI, GNUEABIHF, GNUEABIHFT64, GNUEABIT64, GNUF32, GNUF64, GNUILP32, GNUSF, GNUT64, GNUX32, Hull, Intersection, Itanium, Library, LLVM, llvm_unreachable, MacABI, Mesh, Miss, MSVC, Musl, MuslABI64, MuslABIN32, MuslEABI, MuslEABIHF, MuslF32, MuslSF, MuslX32, OpenCL, OpenHOS, PAuthTest, Pixel, RayGeneration, Simulator, UnknownEnvironment, and Vertex.
Referenced by getEnvironmentVersionString(), llvm::dxil::ModuleMetadataInfo::print(), setEnvironment(), setObjectFormat(), and translateMetadata().
VersionTuple Triple::getEnvironmentVersion | ( | ) | const |
Parse the version number from the OS name component of the triple, if present.
For example, "fooos1.2.3" would return (1, 2, 3).
Definition at line 1353 of file Triple.cpp.
References getEnvironmentVersionString(), and parseVersionFromName().
Referenced by isAndroidVersionLT().
StringRef Triple::getEnvironmentVersionString | ( | ) | const |
Get the version component of the environment component as a single string (the version after the environment).
For example, "fooos1.2.3" would return "1.2.3".
Definition at line 1357 of file Triple.cpp.
References llvm::StringRef::consume_back(), llvm::StringRef::consume_front(), llvm::StringRef::contains(), getEnvironment(), getEnvironmentName(), getEnvironmentTypeName(), getObjectFormat(), getObjectFormatTypeName(), str(), and UnknownObjectFormat.
Referenced by getEnvironmentVersion().
VersionTuple Triple::getiOSVersion | ( | ) | const |
Parse the version number as with getOSVersion.
This should only be called with IOS or generic triples.
Definition at line 1439 of file Triple.cpp.
References aarch64, Darwin, DriverKit, getArch(), getOS(), getOSVersion(), IOS, llvm_unreachable, MacOSX, TvOS, llvm::Version, WatchOS, and XROS.
Referenced by llvm::AArch64Subtarget::supportsAddressTopByteIgnored().
Triple Triple::getLittleEndianArchVariant | ( | ) | const |
Form a triple with a little endian variant of the current architecture.
This can be used to move across "families" of architectures where useful.
Definition at line 1917 of file Triple.cpp.
References aarch64, aarch64_be, armeb, bpfeb, bpfel, getArch(), getSubArch(), isLittleEndian(), lanai, llvm_unreachable, m68k, mips, mips64, mips64el, mipsel, ppc, ppc64, ppc64le, ppcle, sparc, sparcel, sparcv9, systemz, tce, tcele, thumbeb, and UnknownArch.
bool Triple::getMacOSXVersion | ( | VersionTuple & | Version | ) | const |
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.
Definition at line 1394 of file Triple.cpp.
References Darwin, DriverKit, getOS(), getOSVersion(), IOS, llvm_unreachable, MacOSX, TvOS, llvm::Version, WatchOS, and XROS.
VersionTuple Triple::getMinimumSupportedOSVersion | ( | ) | const |
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.
Definition at line 2056 of file Triple.cpp.
References aarch64, Apple, DriverKit, getArch(), getOS(), getVendor(), IOS, isArm64e(), isMacCatalystEnvironment(), isSimulatorEnvironment(), MacOSX, TvOS, and WatchOS.
Referenced by llvm::MachO::mapToSupportedOSVersion().
|
inline |
Get the object format for this triple.
Definition at line 409 of file Triple.h.
Referenced by createARMAsmBackend(), getEnvironmentVersionString(), isCompatibleWith(), isOSBinFormatCOFF(), isOSBinFormatDXContainer(), isOSBinFormatELF(), isOSBinFormatGOFF(), isOSBinFormatMachO(), isOSBinFormatWasm(), isOSBinFormatXCOFF(), llvm::MCContext::MCContext(), llvm::orc::GDBJITDebugInfoRegistrationPlugin::modifyPassConfig(), llvm::setGlobalVariableLargeSection(), and shouldInstrumentReadWriteFromAddress().
|
static |
Get the name for the Object
format.
Definition at line 372 of file Triple.cpp.
References COFF, DXContainer, ELF, GOFF, llvm_unreachable, MachO, SPIRV, UnknownObjectFormat, Wasm, and XCOFF.
Referenced by llvm::orc::enableDebuggerSupport(), getEnvironmentVersionString(), normalize(), setEnvironment(), and setObjectFormat().
|
inline |
Get the parsed operating system type of this triple.
Definition at line 392 of file Triple.h.
Referenced by llvm::ARMELFMCAsmInfo::ARMELFMCAsmInfo(), llvm::createAArch64beAsmBackend(), llvm::createAArch64leAsmBackend(), createARMAsmBackend(), llvm::createAVRAsmBackend(), llvm::createM68kAsmBackend(), llvm::createSparcAsmBackend(), llvm::createSystemZMCAsmBackend(), llvm::createVEAsmBackend(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), llvm::createXtensaMCAsmBackend(), llvm::AMDGPUAsmPrinter::doFinalization(), llvm::AMDGPUAsmPrinter::doInitialization(), llvm::AMDGPUAsmPrinter::emitEndOfAsmFile(), llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), llvm::AMDGPUAsmPrinter::emitFunctionEntryLabel(), llvm::AMDGPUAsmPrinter::emitGlobalVariable(), emplace(), llvm::ARM::getARMCPUForArch(), getDriverKitVersion(), getDXILVersion(), llvm::AMDGPUSubtarget::getExplicitKernelArgOffset(), getiOSVersion(), getMacOSXVersion(), getMinimumSupportedOSVersion(), getOSVersion(), getVulkanVersion(), getWatchOSVersion(), llvm::AMDGPUSubtarget::isAmdHsaOS(), llvm::AMDGPUSubtarget::isAmdPalOS(), isCompatibleWith(), isDriverKit(), llvm::AMDGPU::isHsaAbi(), isiOS(), isMacOSX(), isMacOSXVersionLT(), llvm::AMDGPUSubtarget::isMesa3DOS(), isOSAIX(), isOSDragonFly(), isOSEmscripten(), isOSFreeBSD(), isOSFuchsia(), isOSGlibc(), isOSHaiku(), isOSHurd(), isOSIAMCU(), isOSKFreeBSD(), isOSLinux(), isOSLiteOS(), isOSNaCl(), isOSNetBSD(), isOSOpenBSD(), isOSSerenity(), isOSSolaris(), isOSUnknown(), isOSWASI(), isOSWindows(), isOSzOS(), isPPC32SecurePlt(), isPPC64ELFv2ABI(), isPS4(), isPS5(), isShaderModelOS(), isTvOS(), isUEFI(), isVulkanOS(), isWatchOS(), isXROS(), llvm::SITargetLowering::shouldUseLDSConstAddress(), and llvm::AMDGPU::IsaInfo::AMDGPUTargetID::toString().
StringRef Triple::getOSAndEnvironmentName | ( | ) | const |
Get the operating system and optional environment components as a single string (separated by a '-' if the environment component is present).
Definition at line 1342 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by setArchName(), and setVendorName().
|
inline |
Return just the major version number, this is specialized because it is a common query.
Definition at line 419 of file Triple.h.
References llvm::VersionTuple::getMajor(), and getOSVersion().
Referenced by isPPC32SecurePlt(), and isPPC64ELFv2ABI().
StringRef Triple::getOSName | ( | ) | const |
Get the operating system (third) component of the triple.
Definition at line 1330 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by getDXILVersion(), getOSVersion(), and setEnvironmentName().
Get the canonical name for the Kind
operating system.
Definition at line 258 of file Triple.cpp.
References AIX, AMDHSA, AMDPAL, BridgeOS, CUDA, Darwin, DragonFly, DriverKit, ELFIAMCU, Emscripten, FreeBSD, Fuchsia, Haiku, HermitCore, Hurd, IOS, KFreeBSD, Linux, LiteOS, llvm_unreachable, Lv2, MacOSX, Mesa3D, NaCl, NetBSD, NVCL, OpenBSD, PS4, PS5, RTEMS, Serenity, ShaderModel, Solaris, TvOS, UEFI, UnknownOS, Vulkan, WASI, WatchOS, Win32, XROS, and ZOS.
Referenced by getOSVersion(), and setOS().
VersionTuple Triple::getOSVersion | ( | ) | const |
Parse the version number from the OS name component of the triple, if present.
For example, "fooos1.2.3" would return (1, 2, 3).
Definition at line 1380 of file Triple.cpp.
References llvm::StringRef::consume_front(), getOS(), getOSName(), getOSTypeName(), MacOSX, parseVersionFromName(), llvm::StringRef::size(), llvm::StringRef::starts_with(), and llvm::StringRef::substr().
Referenced by getDriverKitVersion(), getiOSVersion(), getMacOSXVersion(), getOSMajorVersion(), getVulkanVersion(), getWatchOSVersion(), isOSVersionLT(), isPPC32SecurePlt(), isPPC64ELFv2ABI(), and llvm::MachO::mapToSupportedOSVersion().
|
inline |
get the parsed subarchitecture type for this triple.
Definition at line 386 of file Triple.h.
Referenced by get32BitArchVariant(), get64BitArchVariant(), getBigEndianArchVariant(), getDXILVersion(), getLittleEndianArchVariant(), getVulkanVersion(), isArm64e(), isArmMClass(), isArmT32(), isCompatibleWith(), llvm::ARMBaseTargetMachine::isTargetHardFloat(), isWatchABI(), isWindowsArm64EC(), and llvm::object::ELFObjectFileBase::setARMSubArch().
|
inline |
Definition at line 452 of file Triple.h.
Referenced by llvm::orc::JITTargetMachineBuilder::createTargetMachine(), llvm::codegen::createTargetMachineForTriple(), llvm::dwarf_linker::classic::DwarfStreamer::init(), llvm::dwarf_linker::parallel::DwarfEmitterImpl::init(), llvm::TargetRegistry::lookupTarget(), llvm::EngineBuilder::selectTarget(), and llvm::SPIRVTranslateModule().
|
inline |
Get the parsed vendor type of this triple.
Definition at line 389 of file Triple.h.
Referenced by llvm::SubtargetFeatures::getDefaultSubtargetFeatures(), getMinimumSupportedOSVersion(), isCompatibleWith(), isPS4(), isPS5(), and merge().
StringRef Triple::getVendorName | ( | ) | const |
Get the vendor (second) component of the triple.
Definition at line 1325 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by setArchName(), setEnvironmentName(), setOSAndEnvironmentName(), and setOSName().
|
static |
Get the canonical name for the Kind
vendor.
Definition at line 234 of file Triple.cpp.
References AMD, Apple, CSR, Freescale, IBM, ImaginationTechnologies, Intel, llvm_unreachable, Mesa, MipsTechnologies, NVIDIA, OpenEmbedded, PC, SCEI, SUSE, and UnknownVendor.
Referenced by setVendor().
VersionTuple Triple::getVulkanVersion | ( | ) | const |
Parse the Vulkan version number from the OSVersion and SPIR-V version (SubArch).
This should only be called with Vulkan SPIR-V triples.
Definition at line 1506 of file Triple.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::contains(), getArch(), getOS(), getOSVersion(), getSubArch(), llvm_unreachable, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::lookup(), NoSubArch, spirv, SPIRVSubArch_v15, SPIRVSubArch_v16, and Vulkan.
VersionTuple Triple::getWatchOSVersion | ( | ) | const |
Parse the version number as with getOSVersion.
This should only be called with WatchOS or generic triples.
Definition at line 1469 of file Triple.cpp.
References Darwin, DriverKit, getOS(), getOSVersion(), IOS, llvm_unreachable, MacOSX, llvm::Version, WatchOS, and XROS.
|
inline |
Tests whether the target uses -data-sections as default.
Definition at line 1105 of file Triple.h.
References isOSBinFormatXCOFF(), and isWasm().
Referenced by llvm::codegen::InitTargetOptionsFromCodeGenFlags().
|
inline |
Tests whether the target uses emulated TLS as default.
Note: Android API level 29 (10) introduced ELF TLS.
Definition at line 1095 of file Triple.h.
References isAndroid(), isAndroidVersionLT(), isOHOSFamily(), isOSOpenBSD(), and isWindowsCygwinEnvironment().
Referenced by llvm::codegen::InitTargetOptionsFromCodeGenFlags().
|
inline |
True if the target supports both general-dynamic and TLSDESC, and TLSDESC is enabled by default.
Definition at line 1102 of file Triple.h.
References isAndroid(), and isRISCV64().
Referenced by llvm::codegen::InitTargetOptionsFromCodeGenFlags().
|
inline |
Tests if the environment supports dllimport/export annotations.
Definition at line 1110 of file Triple.h.
References isOSWindows(), and isPS().
|
inline |
Does this triple have the optional environment (fourth) component?
Definition at line 395 of file Triple.h.
References getEnvironmentName().
Referenced by setOSName().
|
inline |
Tests whether the target is AArch64 (little and big endian).
Definition at line 928 of file Triple.h.
References aarch64, aarch64_32, aarch64_be, and getArch().
Referenced by CreateVarArgHelper(), isAArch64(), llvm::FastISel::selectXRayCustomEvent(), llvm::FastISel::selectXRayTypedEvent(), and llvm::WinException::WinException().
|
inline |
Tests whether the target is AArch64 and pointers are the size specified by PointerWidth
.
Definition at line 935 of file Triple.h.
References aarch64_32, assert(), getArch(), getEnvironment(), GNUILP32, and isAArch64().
|
inline |
Definition at line 1054 of file Triple.h.
References getEnvironment(), GNUABIN32, and MuslABIN32.
Referenced by getShadowMapping().
|
inline |
|
inline |
Definition at line 862 of file Triple.h.
References amdgcn, getArch(), and r600.
Referenced by llvm::InformationCache::getFlatAddressSpace(), getShadowMapping(), llvm::object::ObjectFile::makeTriple(), and llvm::InformationCache::targetIsGPU().
|
inline |
Tests whether the target is Android.
Definition at line 780 of file Triple.h.
References Android, and getEnvironment().
Referenced by llvm::TargetLoweringBase::getSafeStackPointerLocation(), getShadowMapping(), hasDefaultEmulatedTLS(), hasDefaultTLSDESC(), hasStackGuardSlotTLS(), isAndroidVersionLT(), isOSGlibc(), llvm::AArch64Subtarget::isTargetAndroid(), llvm::ARMSubtarget::isTargetAndroid(), llvm::X86Subtarget::isTargetAndroid(), and isTargetEHABICompatible().
Definition at line 782 of file Triple.h.
References assert(), getEnvironmentVersion(), isAndroid(), isArch64Bit(), and llvm::Version.
Referenced by getShadowMapping(), hasDefaultEmulatedTLS(), and hasStackGuardSlotTLS().
bool Triple::isArch16Bit | ( | ) | const |
Test whether the architecture is 16-bit.
Note that this tests for 16-bit pointer width, and nothing else.
Definition at line 1689 of file Triple.cpp.
References getArch(), and getArchPointerBitWidth().
bool Triple::isArch32Bit | ( | ) | const |
Test whether the architecture is 32-bit.
Note that this tests for 32-bit pointer width, and nothing else.
Definition at line 1685 of file Triple.cpp.
References getArch(), and getArchPointerBitWidth().
Referenced by llvm::sys::getProcessTriple(), llvm::TargetLoweringObjectFileXCOFF::Initialize(), and llvm::AArch64Subtarget::isTargetILP32().
bool Triple::isArch64Bit | ( | ) | const |
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.
Definition at line 1681 of file Triple.cpp.
References getArch(), and getArchPointerBitWidth().
Referenced by calculateCXXStateNumbers(), llvm::WebAssemblyRegisterInfo::getFrameRegister(), llvm::WebAssembly::getOrCreateFunctionTableSymbol(), llvm::sys::getProcessTriple(), llvm::WebAssemblySubtarget::hasAddr64(), llvm::object::IRObjectFile::is64Bit(), isAndroidVersionLT(), llvm::ifs::parseTriple(), llvm::coro::BaseCloner::salvageDebugInfo(), and llvm::BasicTTIImplBase< T >::shouldBuildRelLookupTables().
|
inline |
Tests whether the target is ARM (little and big endian).
Definition at line 872 of file Triple.h.
References arm, armeb, and getArch().
Referenced by CreateVarArgHelper(), getShadowMapping(), and isTargetEHABICompatible().
|
inline |
Tests whether the target is the Apple "arm64e" AArch64 subarch.
Definition at line 1048 of file Triple.h.
References aarch64, AArch64SubArch_arm64e, getArch(), and getSubArch().
Referenced by getMinimumSupportedOSVersion(), and llvm::lto::getThinLTODefaultCPU().
|
inline |
Tests whether the target is an M-class.
Definition at line 913 of file Triple.h.
References ARMSubArch_v6m, ARMSubArch_v7em, ARMSubArch_v7m, ARMSubArch_v8_1m_mainline, ARMSubArch_v8m_baseline, ARMSubArch_v8m_mainline, and getSubArch().
|
inline |
Tests whether the target is T32.
Definition at line 893 of file Triple.h.
References ARMSubArch_v4t, ARMSubArch_v5, ARMSubArch_v5te, ARMSubArch_v6, ARMSubArch_v6k, ARMSubArch_v6m, ARMSubArch_v6t2, ARMSubArch_v7k, ARMSubArch_v7s, ARMSubArch_v7ve, ARMSubArch_v8m_baseline, and getSubArch().
|
inline |
Test whether target triples are compatible.
Definition at line 2006 of file Triple.cpp.
References Apple, arm, armeb, getArch(), getEnvironment(), getObjectFormat(), getOS(), getSubArch(), getVendor(), llvm::Other, thumb, and thumbeb.
Referenced by llvm::ThinLTOCodeGenerator::addModule().
|
inline |
|
inline |
Is this an Apple DriverKit triple.
Definition at line 563 of file Triple.h.
References DriverKit, and getOS().
Referenced by getShadowMapping(), isOSDarwin(), llvm::ARMSubtarget::isTargetDriverKit(), and llvm::AArch64Subtarget::supportsAddressTopByteIgnored().
|
inline |
|
inline |
Definition at line 614 of file Triple.h.
References getEnvironment(), GNU, GNUABI64, GNUABIN32, GNUEABI, GNUEABIHF, GNUEABIHFT64, GNUEABIT64, GNUF32, GNUF64, GNUSF, GNUT64, and GNUX32.
|
inline |
Tests if the target forces hardfloat.
Definition at line 1078 of file Triple.h.
References EABIHF, getEnvironment(), GNUEABIHF, GNUEABIHFT64, and MuslEABIHF.
|
inline |
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.
Definition at line 541 of file Triple.h.
References getOS(), IOS, and isTvOS().
Referenced by getShadowMapping(), isOSDarwin(), llvm::AArch64Subtarget::isTargetIOS(), llvm::ARMSubtarget::isTargetIOS(), and llvm::AArch64Subtarget::supportsAddressTopByteIgnored().
|
inline |
Checks if the environment is MSVC.
Definition at line 640 of file Triple.h.
References getEnvironment(), isOSWindows(), and MSVC.
Referenced by isWindowsMSVCEnvironment(), and runImpl().
bool Triple::isLittleEndian | ( | ) | const |
Tests whether the target triple is little endian.
Definition at line 1954 of file Triple.cpp.
References aarch64, aarch64_32, amdgcn, amdil, amdil64, arm, avr, bpfel, csky, dxil, getArch(), hexagon, hsail, hsail64, kalimba, loongarch32, loongarch64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc64le, ppcle, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparcel, spir, spir64, spirv, spirv32, spirv64, tcele, thumb, ve, wasm32, wasm64, x86, x86_64, xcore, and xtensa.
Referenced by getBigEndianArchVariant(), getLittleEndianArchVariant(), getUUID(), lowerMSASplatZExt(), llvm::MipsELFMCAsmInfo::MipsELFMCAsmInfo(), llvm::ifs::parseTriple(), and truncateVecElts().
|
inline |
Tests whether the target is LoongArch (32- and 64-bit).
Definition at line 952 of file Triple.h.
References isLoongArch32(), and isLoongArch64().
|
inline |
Tests whether the target is 32-bit LoongArch.
Definition at line 946 of file Triple.h.
References getArch(), and loongarch32.
Referenced by isLoongArch().
|
inline |
Tests whether the target is 64-bit LoongArch.
Definition at line 949 of file Triple.h.
References getArch(), and loongarch64.
Referenced by CreateVarArgHelper(), getShadowMapping(), and isLoongArch().
|
inline |
Definition at line 576 of file Triple.h.
References getEnvironment(), and MacABI.
Referenced by getMinimumSupportedOSVersion(), and isTargetMachineMac().
|
inline |
Is this a Mac OS X triple.
For legacy reasons, we support both "darwin" and "osx" as OS X triples.
Definition at line 532 of file Triple.h.
References Darwin, getOS(), and MacOSX.
Referenced by llvm::MCStreamer::emitVersionForTarget(), getShadowMapping(), isMacOSXVersionLT(), isOSDarwin(), and isTargetMachineMac().
Comparison function for checking OS X version compatibility, which handles supporting skewed version numbering schemes used by the "darwin" triples.
Definition at line 2039 of file Triple.cpp.
References assert(), getOS(), isMacOSX(), isOSVersionLT(), and MacOSX.
|
inline |
Tests whether the target is MIPS (little and big endian, 32- or 64-bit).
Definition at line 965 of file Triple.h.
References isMIPS32(), and isMIPS64().
|
inline |
Tests whether the target is MIPS 32-bit (little and big endian).
Definition at line 955 of file Triple.h.
References getArch(), mips, and mipsel.
Referenced by CreateVarArgHelper(), getShadowMapping(), and isMIPS().
|
inline |
Tests whether the target is MIPS 64-bit (little and big endian).
Definition at line 960 of file Triple.h.
References getArch(), mips64, and mips64el.
Referenced by CreateVarArgHelper(), getShadowMapping(), isMIPS(), and llvm::MipsELFMCAsmInfo::MipsELFMCAsmInfo().
|
inline |
Tests whether the environment is musl-libc.
Definition at line 795 of file Triple.h.
References getEnvironment(), isOSLiteOS(), Musl, MuslABI64, MuslABIN32, MuslEABI, MuslEABIHF, MuslF32, MuslSF, MuslX32, and OpenHOS.
Referenced by isPPC32SecurePlt(), and isPPC64ELFv2ABI().
|
inline |
Tests whether the target is NVPTX (32- or 64-bit).
Definition at line 855 of file Triple.h.
References getArch(), nvptx, and nvptx64.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), llvm::offloading::emitOffloadingEntry(), llvm::InformationCache::getFlatAddressSpace(), llvm::offloading::getOffloadingEntryInitializer(), llvm::object::ObjectFile::makeTriple(), and llvm::InformationCache::targetIsGPU().
|
inline |
Tests whether the target is OHOS LiteOS default enviroment is also OHOS, but omited on triple.
Definition at line 809 of file Triple.h.
References isOpenHOS(), and isOSLiteOS().
Referenced by hasDefaultEmulatedTLS().
|
inline |
Definition at line 811 of file Triple.h.
References getEnvironment(), and OpenHOS.
Referenced by isOHOSFamily().
|
inline |
Tests whether the OS is AIX.
Definition at line 721 of file Triple.h.
Referenced by createPPCAsmPrinterPass(), insertCall(), llvm::InternalizePass::internalizeModule(), llvm::PPCSubtarget::isAIXABI(), llvm::AsmPrinter::preprocessXXStructorList(), llvm::PPCInstPrinter::printBranchOperand(), llvm::PPCInstPrinter::printInst(), llvm::FastISel::selectOperator(), and llvm::AsmPrinter::SetupMachineFunction().
|
inline |
Tests whether the OS uses the COFF binary format.
Definition at line 735 of file Triple.h.
References COFF, and getObjectFormat().
Referenced by llvm::ARMAsmBackend::adjustFixupValue(), adjustFixupValue(), llvm::createAArch64leAsmBackend(), createAArch64MCAsmInfo(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), llvm::createX86ObjectTargetStreamer(), llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::emitGlobalAlias(), llvm::offloading::emitOffloadingEntry(), llvm::TargetLowering::expandIndirectJTBranch(), llvm::RISCVTargetLowering::expandIndirectJTBranch(), llvm::X86TargetLowering::expandIndirectJTBranch(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), llvm::offloading::getOffloadEntryArray(), llvm::AArch64Subtarget::isTargetCOFF(), llvm::ARMSubtarget::isTargetCOFF(), llvm::X86Subtarget::isTargetCOFF(), llvm::AArch64MCInstLower::LowerSymbolOperand(), and llvm::orc::LLJITBuilderState::prepareForConstruction().
|
inline |
Tests whether the OS uses the DXContainer binary format.
Definition at line 758 of file Triple.h.
References DXContainer, and getObjectFormat().
Referenced by supportsCOMDAT().
|
inline |
Tests whether the OS uses the ELF binary format.
Definition at line 730 of file Triple.h.
References ELF, and getObjectFormat().
Referenced by llvm::lto::LTO::add(), llvm::ARMAsmBackend::adjustFixupValue(), llvm::GlobalObject::canIncreaseAlignment(), llvm::orc::PerfSupportPlugin::Create(), llvm::createAArch64beAsmBackend(), llvm::createAArch64leAsmBackend(), createAArch64MCAsmInfo(), createARMAsmBackend(), createLoongArchObjectTargetStreamer(), createX86MCAsmInfo(), llvm::AsmPrinter::doFinalization(), llvm::CSKYAsmPrinter::emitEndOfAsmFile(), llvm::HexagonAsmPrinter::emitEndOfAsmFile(), llvm::AsmPrinter::emitFunctionEntryLabel(), llvm::LoongArchAsmPrinter::emitJumpTableInfo(), llvm::AsmPrinter::emitPatchableFunctionEntries(), llvm::CSKYAsmPrinter::emitStartOfAsmFile(), llvm::HexagonAsmPrinter::emitStartOfAsmFile(), llvm::LoongArchAsmBackend::getFixupKind(), llvm::RISCVAsmBackend::getFixupKind(), llvm::offloading::getOffloadEntryArray(), llvm::AsmPrinter::getSymbolPreferLocal(), llvm::AArch64RegisterInfo::getTLSCallPreservedMask(), hasELFSignedGOTHelper(), isTargetEHABICompatible(), llvm::AArch64Subtarget::isTargetELF(), llvm::ARMSubtarget::isTargetELF(), llvm::M68kSubtarget::isTargetELF(), llvm::MipsSubtarget::isTargetELF(), llvm::PPCSubtarget::isTargetELF(), llvm::SystemZSubtarget::isTargetELF(), llvm::X86Subtarget::isTargetELF(), llvm::AArch64MCInstLower::LowerSymbolOperand(), llvm::orc::LLJITBuilderState::prepareForConstruction(), and runImpl().
|
inline |
Tests whether the OS uses the GOFF binary format.
Definition at line 740 of file Triple.h.
References getObjectFormat(), and GOFF.
Referenced by llvm::SystemZSubtarget::isTargetGOFF().
|
inline |
Tests whether the environment is MachO.
Definition at line 743 of file Triple.h.
References getObjectFormat(), and MachO.
Referenced by llvm::TargetPassConfig::addIRPasses(), llvm::createAArch64leAsmBackend(), createAArch64MCAsmInfo(), createARMMCAsmInfo(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), createX86MCAsmInfo(), llvm::AsmPrinter::emitXRayTable(), llvm::ARMBaseTargetMachine::isTargetHardFloat(), llvm::AArch64Subtarget::isTargetMachO(), llvm::ARMSubtarget::isTargetMachO(), llvm::PPCSubtarget::isTargetMachO(), llvm::X86Subtarget::isTargetMachO(), llvm::AArch64MCInstLower::LowerSymbolOperand(), llvm::orc::SelfExecutorProcessControl::SelfExecutorProcessControl(), and supportsCOMDAT().
|
inline |
Tests whether the OS uses the Wasm binary format.
Definition at line 748 of file Triple.h.
References getObjectFormat(), and Wasm.
Referenced by llvm::InternalizePass::internalizeModule().
|
inline |
Tests whether the OS uses the XCOFF binary format.
Definition at line 753 of file Triple.h.
References getObjectFormat(), and XCOFF.
Referenced by llvm::GlobalObject::canIncreaseAlignment(), createPPCMCAsmInfo(), llvm::AsmPrinter::doFinalization(), llvm::AsmPrinter::doInitialization(), llvm::AsmPrinter::emitGlobalAlias(), emitGlobalConstantImpl(), hasDefaultDataSections(), and supportsCOMDAT().
|
inline |
Tests for either Cygwin or MinGW OS.
Definition at line 673 of file Triple.h.
References isWindowsCygwinEnvironment(), and isWindowsGNUEnvironment().
Referenced by createX86MCAsmInfo(), and llvm::X86Subtarget::isTargetCygMing().
|
inline |
Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, XROS, or DriverKit).
Definition at line 568 of file Triple.h.
References isDriverKit(), isiOS(), isMacOSX(), isWatchOS(), and isXROS().
Referenced by llvm::ARMBaseTargetMachine::ARMBaseTargetMachine(), llvm::ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(), ContainsProtectableArray(), createARMMCAsmInfo(), llvm::TargetInstrInfo::duplicate(), llvm::X86FrameLowering::emitEpilogue(), llvm::AArch64RegisterInfo::getRegPressureLimit(), llvm::AArch64RegisterInfo::getStrictlyReservedRegs(), llvm::lto::getThinLTODefaultCPU(), llvm::AArch64RegisterInfo::getTLSCallPreservedMask(), llvm::TargetLoweringBase::insertSSPDeclarations(), llvm::AArch64Subtarget::isTargetDarwin(), llvm::ARMSubtarget::isTargetDarwin(), llvm::X86Subtarget::isTargetDarwin(), isTargetMachineMac(), llvm::BasicTTIImplBase< T >::shouldBuildRelLookupTables(), shouldLowerMemFuncForSize(), and llvm::TailDuplicator::shouldTailDuplicate().
|
inline |
Definition at line 602 of file Triple.h.
References DragonFly, and getOS().
Referenced by llvm::X86Subtarget::isTargetDragonFly().
|
inline |
Tests whether the OS is Emscripten.
Definition at line 709 of file Triple.h.
References Emscripten, and getOS().
Referenced by GetCtorAndDtorPriority(), and getShadowMapping().
|
inline |
Definition at line 594 of file Triple.h.
References FreeBSD, and getOS().
Referenced by getShadowMapping(), llvm::TargetLoweringObjectFileELF::Initialize(), llvm::TargetLoweringBase::insertSSPDeclarations(), and llvm::X86Subtarget::isTargetFreeBSD().
|
inline |
Definition at line 598 of file Triple.h.
References Fuchsia, and getOS().
Referenced by getShadowMapping(), hasStackGuardSlotTLS(), llvm::AArch64Subtarget::isTargetFuchsia(), and llvm::X86Subtarget::isTargetFuchsia().
|
inline |
Tests whether the OS uses glibc.
Definition at line 714 of file Triple.h.
References getOS(), Hurd, isAndroid(), KFreeBSD, and Linux.
Referenced by llvm::PPCInstrInfo::expandPostRAPseudo(), hasStackGuardSlotTLS(), and llvm::X86Subtarget::isTargetGlibc().
|
inline |
|
inline |
|
inline |
Definition at line 608 of file Triple.h.
References ELFIAMCU, and getOS().
Referenced by llvm::createX86_32AsmBackend(), and llvm::X86Subtarget::isTargetMCU().
|
inline |
Tests whether the OS is kFreeBSD.
Definition at line 694 of file Triple.h.
References getOS(), and KFreeBSD.
Referenced by llvm::X86Subtarget::isTargetKFreeBSD().
|
inline |
Tests whether the OS is Linux.
Definition at line 689 of file Triple.h.
References getOS(), and Linux.
Referenced by getShadowMapping(), llvm::AArch64Subtarget::isTargetLinux(), llvm::ARMSubtarget::isTargetLinux(), llvm::PPCSubtarget::isTargetLinux(), llvm::SparcSubtarget::isTargetLinux(), llvm::VESubtarget::isTargetLinux(), and llvm::X86Subtarget::isTargetLinux().
|
inline |
|
inline |
Is this a "Windows" OS targeting a "MSVCRT.dll" environment.
Definition at line 678 of file Triple.h.
References isWindowsGNUEnvironment(), isWindowsItaniumEnvironment(), and isWindowsMSVCEnvironment().
Referenced by computeBytesPoppedByCalleeForSRet(), hasCalleePopSRet(), and llvm::X86TargetLowering::useStackGuardXorFP().
|
inline |
Tests whether the OS is NaCl (Native Client)
Definition at line 684 of file Triple.h.
Referenced by llvm::X86Subtarget::isTarget64BitILP32(), llvm::X86Subtarget::isTarget64BitLP64(), llvm::ARMSubtarget::isTargetNaCl(), llvm::MipsSubtarget::isTargetNaCl(), and llvm::X86Subtarget::isTargetNaCl().
|
inline |
Definition at line 586 of file Triple.h.
References getOS(), and NetBSD.
Referenced by getShadowMapping(), and llvm::ARMSubtarget::isTargetNetBSD().
|
inline |
Definition at line 590 of file Triple.h.
References getOS(), and OpenBSD.
Referenced by CreateFailBB(), and hasDefaultEmulatedTLS().
|
inline |
|
inline |
Definition at line 604 of file Triple.h.
References getOS(), and Solaris.
Referenced by llvm::X86Subtarget::isTargetSolaris().
|
inline |
Definition at line 521 of file Triple.h.
References getOSVersion(), and llvm::Other.
|
inline |
Helper function for doing comparisons against version numbers included in the target triple.
Definition at line 510 of file Triple.h.
References getOSVersion().
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), and isMacOSXVersionLT().
|
inline |
|
inline |
Tests whether the OS is Windows.
Definition at line 635 of file Triple.h.
References getOS(), and Win32.
Referenced by llvm::ARMBaseTargetMachine::ARMBaseTargetMachine(), createARMAsmBackend(), createARMMCAsmInfo(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), llvm::AsmPrinter::doInitialization(), llvm::X86FrameLowering::emitEpilogue(), llvm::AArch64MCInstLower::GetGlobalValueSymbol(), getShadowMapping(), hasDLLImportExport(), isKnownWindowsMSVCEnvironment(), llvm::X86Subtarget::isOSWindows(), llvm::ARMBaseTargetMachine::isTargetHardFloat(), llvm::AArch64Subtarget::isTargetWindows(), llvm::ARMSubtarget::isTargetWindows(), isWindowsCoreCLREnvironment(), isWindowsCygwinEnvironment(), isWindowsGNUEnvironment(), isWindowsItaniumEnvironment(), isWindowsMSVCEnvironment(), llvm::MCContext::MCContext(), ShouldSignWithBKey(), and llvm::X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF().
|
inline |
Definition at line 565 of file Triple.h.
Referenced by llvm::createSystemZMCAsmBackend(), llvm::SystemZAsmPrinter::emitFunctionBodyEnd(), llvm::SystemZAsmPrinter::emitStartOfAsmFile(), and llvm::SystemZSubtarget::isTargetzOS().
|
inline |
|
inline |
|
inline |
|
inline |
Tests whether the target is 64-bit PowerPC (little and big endian).
Definition at line 981 of file Triple.h.
References getArch(), ppc64, and ppc64le.
Referenced by CreateVarArgHelper(), llvm::TargetLoweringBase::insertSSPDeclarations(), llvm::PPCInstPrinter::printAbsBranchOperand(), and llvm::PPCInstPrinter::printBranchOperand().
|
inline |
Tests whether the target 64-bit PowerPC big endian ABI is ELFv2.
Definition at line 986 of file Triple.h.
References FreeBSD, getArch(), getOS(), getOSMajorVersion(), getOSVersion(), isMusl(), OpenBSD, and ppc64.
Referenced by llvm::orc::LLJITBuilderState::prepareForConstruction().
|
inline |
Tests whether the target is the PS4 or PS5 platform.
Definition at line 777 of file Triple.h.
References isPS4(), and isPS5().
Referenced by getShadowMapping(), hasDLLImportExport(), and llvm::X86Subtarget::isTargetPS().
|
inline |
Tests whether the target is the PS4 platform.
Definition at line 763 of file Triple.h.
References getArch(), getOS(), getVendor(), PS4, SCEI, and x86_64.
Referenced by llvm::MCObjectFileInfo::getStackSizesSection(), and isPS().
|
inline |
|
inline |
Tests whether the target is RISC-V (32- and 64-bit).
Definition at line 1009 of file Triple.h.
References isRISCV32(), and isRISCV64().
|
inline |
|
inline |
Tests whether the target is 64-bit RISC-V.
Definition at line 1006 of file Triple.h.
References getArch(), and riscv64.
Referenced by CreateVarArgHelper(), hasDefaultTLSDESC(), and isRISCV().
|
inline |
Definition at line 820 of file Triple.h.
References getOS(), and ShaderModel.
|
inline |
Definition at line 826 of file Triple.h.
References Amplification, AnyHit, Callable, ClosestHit, Compute, Domain, Geometry, getEnvironment(), Hull, Intersection, Library, Mesh, Miss, Pixel, RayGeneration, and Vertex.
|
inline |
Definition at line 572 of file Triple.h.
References getEnvironment(), and Simulator.
Referenced by getMinimumSupportedOSVersion(), and isTargetMachineMac().
|
inline |
Tests whether the target is SPARC.
Definition at line 1020 of file Triple.h.
References isSPARC32(), and isSPARC64().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Tests whether the target supports the EHABI exception handling standard.
Definition at line 878 of file Triple.h.
References EABI, EABIHF, getEnvironment(), GNUEABI, GNUEABIHF, GNUEABIHFT64, GNUEABIT64, isAndroid(), isARM(), isOSBinFormatELF(), isThumb(), MuslEABI, MuslEABIHF, and OpenHOS.
Referenced by llvm::ARMSubtarget::isTargetEHABICompatible().
|
inline |
Returns true for targets that run on a macOS machine.
Definition at line 581 of file Triple.h.
References isMacCatalystEnvironment(), isMacOSX(), isOSDarwin(), and isSimulatorEnvironment().
|
inline |
Tests whether the target is Thumb (little and big endian).
Definition at line 867 of file Triple.h.
References getArch(), thumb, and thumbeb.
Referenced by createARMAsmBackend(), getShadowMapping(), isTargetEHABICompatible(), llvm::object::ELFObjectFileBase::setARMSubArch(), and llvm::WinException::WinException().
|
inline |
Tests if the target forces 64-bit time_t on a 32-bit architecture.
Definition at line 1071 of file Triple.h.
References getEnvironment(), GNUEABIHFT64, GNUEABIT64, and GNUT64.
|
inline |
|
inline |
Tests whether the OS is UEFI.
Definition at line 630 of file Triple.h.
Referenced by llvm::createX86_64AsmBackend(), createX86MCAsmInfo(), llvm::MCContext::MCContext(), and llvm::X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF().
|
inline |
|
inline |
|
inline |
Tests whether the target is wasm (32- and 64-bit).
Definition at line 1038 of file Triple.h.
References getArch(), wasm32, and wasm64.
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), llvm::DwarfDebug::emitDebugLocValue(), llvm::OpenMPIRBuilder::getOpenMPDefaultSimdAlign(), and hasDefaultDataSections().
|
inline |
Definition at line 555 of file Triple.h.
References ARMSubArch_v7k, and getSubArch().
Referenced by llvm::ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(), and llvm::ARMSubtarget::isTargetWatchABI().
|
inline |
Is this an Apple watchOS triple.
Definition at line 551 of file Triple.h.
References getOS(), and WatchOS.
Referenced by getShadowMapping(), isOSDarwin(), and llvm::ARMSubtarget::isTargetWatchOS().
|
inline |
Definition at line 651 of file Triple.h.
References aarch64, AArch64SubArch_arm64ec, getArch(), and getSubArch().
Referenced by llvm::AArch64MCInstLower::GetGlobalValueSymbol(), and llvm::AArch64Subtarget::isWindowsArm64EC().
|
inline |
Definition at line 656 of file Triple.h.
References CoreCLR, getEnvironment(), and isOSWindows().
Referenced by createX86MCAsmInfo(), and llvm::X86Subtarget::isTargetWindowsCoreCLR().
|
inline |
Definition at line 664 of file Triple.h.
References Cygnus, getEnvironment(), and isOSWindows().
Referenced by hasDefaultEmulatedTLS(), isOSCygMing(), and llvm::X86Subtarget::isTargetWindowsCygwin().
|
inline |
Definition at line 668 of file Triple.h.
References getEnvironment(), GNU, and isOSWindows().
Referenced by llvm::TargetLoweringBase::insertSSPDeclarations(), isOSCygMing(), isOSMSVCRT(), and llvm::X86Subtarget::isTargetWindowsGNU().
|
inline |
Definition at line 660 of file Triple.h.
References getEnvironment(), isOSWindows(), and Itanium.
Referenced by createX86MCAsmInfo(), llvm::X86TargetLowering::getSDagStackGuard(), llvm::X86TargetLowering::getSSPStackGuardCheck(), llvm::X86TargetLowering::insertSSPDeclarations(), isOSMSVCRT(), and llvm::X86Subtarget::isTargetWindowsItanium().
|
inline |
Checks if the environment could be MSVC.
Definition at line 645 of file Triple.h.
References getEnvironment(), isKnownWindowsMSVCEnvironment(), isOSWindows(), and UnknownEnvironment.
Referenced by createAArch64MCAsmInfo(), createARMMCAsmInfo(), createX86MCAsmInfo(), llvm::AArch64TargetLowering::getSDagStackGuard(), llvm::ARMTargetLowering::getSDagStackGuard(), llvm::X86TargetLowering::getSDagStackGuard(), llvm::AArch64TargetLowering::getSSPStackGuardCheck(), llvm::ARMTargetLowering::getSSPStackGuardCheck(), llvm::X86TargetLowering::getSSPStackGuardCheck(), llvm::AArch64TargetLowering::insertSSPDeclarations(), llvm::ARMTargetLowering::insertSSPDeclarations(), llvm::X86TargetLowering::insertSSPDeclarations(), isOSMSVCRT(), llvm::X86Subtarget::isTargetWindowsMSVC(), and llvm::AArch64TargetLowering::shouldInsertTrailingFenceForAtomicStore().
|
inline |
Tests whether the target is X32.
Definition at line 1060 of file Triple.h.
References getEnvironment(), GNUX32, and MuslX32.
Referenced by llvm::createX86_64AsmBackend(), llvm::X86Subtarget::isTarget64BitILP32(), and llvm::X86Subtarget::isTarget64BitLP64().
|
inline |
|
inline |
Merge target triples.
Definition at line 2030 of file Triple.cpp.
References Apple, getVendor(), llvm::Other, and str().
Referenced by llvm::ThinLTOCodeGenerator::addModule().
|
inline |
Return the normalized form of this triple's string.
Definition at line 376 of file Triple.h.
References normalize().
Referenced by llvm::sys::getProcessTriple(), LLVMNormalizeTargetTriple(), normalize(), and llvm::SPIRVTranslateModule().
|
static |
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.
Definition at line 1111 of file Triple.cpp.
References Android, assert(), llvm::CallingConv::C, COFF, llvm::StringRef::empty(), getDXILArchNameFromShaderModel(), getObjectFormatTypeName(), GNUEABI, Idx, llvm_unreachable, OS, parseArch(), parseEnvironment(), parseFormat(), parseOS(), parseVendor(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::SmallVectorImpl< T >::resize(), ShaderModel, llvm::SmallVectorBase< Size_T >::size(), starts_with(), llvm::StringRef::starts_with(), llvm::Twine::str(), SUSE, std::swap(), UnknownArch, UnknownEnvironment, UnknownObjectFormat, UnknownOS, UnknownVendor, and Win32.
Definition at line 361 of file Triple.h.
References llvm::Other.
Definition at line 354 of file Triple.h.
References llvm::Other.
void Triple::setArch | ( | ArchType | Kind, |
SubArchType | SubArch = NoSubArch |
||
) |
Set the architecture (first) component of the triple to a known type.
Definition at line 1548 of file Triple.cpp.
References getArchName(), and setArchName().
Referenced by llvm::TargetRegistry::lookupTarget(), llvm::object::ObjectFile::makeTriple(), and llvm::EngineBuilder::selectTarget().
void Triple::setArchName | ( | StringRef | Str | ) |
Set the architecture (first) component of the triple by name.
Definition at line 1576 of file Triple.cpp.
References getOSAndEnvironmentName(), getVendorName(), setTriple(), and Triple().
Referenced by setArch(), and llvm::object::ELFObjectFileBase::setARMSubArch().
void Triple::setEnvironment | ( | EnvironmentType | Kind | ) |
Set the environment (fourth) component of the triple to a known type.
Definition at line 1560 of file Triple.cpp.
References getDefaultFormat(), getEnvironmentTypeName(), getObjectFormatTypeName(), setEnvironmentName(), and str().
void Triple::setEnvironmentName | ( | StringRef | Str | ) |
Set the optional environment (fourth) component of the triple by name.
Definition at line 1599 of file Triple.cpp.
References getArchName(), getOSName(), getVendorName(), and setTriple().
Referenced by setEnvironment(), and setObjectFormat().
void Triple::setObjectFormat | ( | ObjectFormatType | Kind | ) |
Set the object file format.
Definition at line 1568 of file Triple.cpp.
References getEnvironmentTypeName(), getObjectFormatTypeName(), setEnvironmentName(), str(), and UnknownEnvironment.
Referenced by llvm::object::ObjectFile::makeTriple().
void Triple::setOS | ( | OSType | Kind | ) |
Set the operating system (third) component of the triple to a known type.
Definition at line 1556 of file Triple.cpp.
References getOSTypeName(), and setOSName().
Referenced by llvm::object::ObjectFile::makeTriple().
void Triple::setOSAndEnvironmentName | ( | StringRef | Str | ) |
Set the operating system and optional environment components with a single string.
Definition at line 1604 of file Triple.cpp.
References getArchName(), getVendorName(), and setTriple().
void Triple::setOSName | ( | StringRef | Str | ) |
Set the operating system (third) component of the triple by name.
Definition at line 1591 of file Triple.cpp.
References getArchName(), getEnvironmentName(), getVendorName(), hasEnvironment(), and setTriple().
Referenced by setOS().
Set all components to the new triple Str
.
Definition at line 1544 of file Triple.cpp.
References Triple().
Referenced by llvm::object::ObjectFile::makeTriple(), llvm::EngineBuilder::selectTarget(), setArchName(), setEnvironmentName(), setOSAndEnvironmentName(), setOSName(), setVendorName(), and llvm::SPIRVTranslateModule().
void Triple::setVendor | ( | VendorType | Kind | ) |
Set the vendor (second) component of the triple to a known type.
Definition at line 1552 of file Triple.cpp.
References getVendorTypeName(), and setVendorName().
Referenced by llvm::object::ObjectFile::makeTriple().
void Triple::setVendorName | ( | StringRef | Str | ) |
Set the vendor (second) component of the triple by name.
Definition at line 1587 of file Triple.cpp.
References getArchName(), getOSAndEnvironmentName(), and setTriple().
Referenced by setVendor().
|
inline |
Definition at line 450 of file Triple.h.
Referenced by llvm::orc::ELFNixPlatform::Create(), llvm::orc::COFFPlatform::Create(), getEnvironmentVersionString(), llvm::object::ELFObjectFileBase::getPltEntries(), llvm::sys::getProcessTriple(), llvm::SPIRVSubtarget::getTargetTripleAsStr(), merge(), llvm::orc::GDBJITDebugInfoRegistrationPlugin::modifyPassConfig(), llvm::orc::JITTargetMachineBuilderPrinter::print(), setEnvironment(), and setObjectFormat().
|
inline |
Tests whether the target supports comdat.
Definition at line 1087 of file Triple.h.
References isOSBinFormatDXContainer(), isOSBinFormatMachO(), and isOSBinFormatXCOFF().
Referenced by llvm::MCObjectFileInfo::getPseudoProbeDescSection(), and llvm::needsComdatForCounter().