|
LLVM
4.0.0
|
Triple - Helper class for working with autoconf configuration names. More...
#include <Triple.h>
Public Member Functions | |
Constructors | |
| Triple () | |
| Default constructor is the same as an empty string and leaves all triple fields unknown. More... | |
| Triple (const Twine &Str) | |
| Construct a triple from the string representation provided. More... | |
| Triple (const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr) | |
| Construct a triple from string representations of the architecture, vendor, and OS. More... | |
| 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. More... | |
| bool | operator== (const Triple &Other) const |
Typed Component Access | |
| ArchType | getArch () const |
| getArch - Get the parsed architecture type of this triple. More... | |
| SubArchType | getSubArch () const |
| getSubArch - get the parsed subarchitecture type for this triple. More... | |
| VendorType | getVendor () const |
| getVendor - Get the parsed vendor type of this triple. More... | |
| OSType | getOS () const |
| getOS - Get the parsed operating system type of this triple. More... | |
| bool | hasEnvironment () const |
| hasEnvironment - Does this triple have the optional environment (fourth) component? More... | |
| EnvironmentType | getEnvironment () const |
| getEnvironment - Get the parsed environment type of this triple. More... | |
| void | getEnvironmentVersion (unsigned &Major, unsigned &Minor, unsigned &Micro) const |
| Parse the version number from the OS name component of the triple, if present. More... | |
| ObjectFormatType | getObjectFormat () const |
| getFormat - Get the object format for this triple. More... | |
| void | getOSVersion (unsigned &Major, unsigned &Minor, unsigned &Micro) const |
| getOSVersion - Parse the version number from the OS name component of the triple, if present. More... | |
| unsigned | getOSMajorVersion () const |
| getOSMajorVersion - Return just the major version number, this is specialized because it is a common query. More... | |
| bool | getMacOSXVersion (unsigned &Major, unsigned &Minor, unsigned &Micro) const |
| getMacOSXVersion - Parse the version number as with getOSVersion and then translate generic "darwin" versions to the corresponding OS X versions. More... | |
| void | getiOSVersion (unsigned &Major, unsigned &Minor, unsigned &Micro) const |
| getiOSVersion - Parse the version number as with getOSVersion. More... | |
| void | getWatchOSVersion (unsigned &Major, unsigned &Minor, unsigned &Micro) const |
| getWatchOSVersion - Parse the version number as with getOSVersion. More... | |
Direct Component Access | |
| const std::string & | str () const |
| const std::string & | getTriple () const |
| StringRef | getArchName () const |
| getArchName - Get the architecture (first) component of the triple. More... | |
| StringRef | getVendorName () const |
| getVendorName - Get the vendor (second) component of the triple. More... | |
| StringRef | getOSName () const |
| getOSName - Get the operating system (third) component of the triple. More... | |
| StringRef | getEnvironmentName () const |
| getEnvironmentName - Get the optional environment (fourth) component of the triple, or "" if empty. More... | |
| StringRef | getOSAndEnvironmentName () const |
| getOSAndEnvironmentName - Get the operating system and optional environment components as a single string (separated by a '-' if the environment component is present). More... | |
Convenience Predicates | |
| bool | isArch64Bit () const |
| Test whether the architecture is 64-bit. More... | |
| bool | isArch32Bit () const |
| Test whether the architecture is 32-bit. More... | |
| bool | isArch16Bit () const |
| Test whether the architecture is 16-bit. More... | |
| bool | isOSVersionLT (unsigned Major, unsigned Minor=0, unsigned Micro=0) const |
| isOSVersionLT - Helper function for doing comparisons against version numbers included in the target triple. More... | |
| bool | isOSVersionLT (const Triple &Other) const |
| bool | isMacOSXVersionLT (unsigned Major, unsigned Minor=0, unsigned Micro=0) const |
| isMacOSXVersionLT - Comparison function for checking OS X version compatibility, which handles supporting skewed version numbering schemes used by the "darwin" triples. More... | |
| bool | isMacOSX () const |
| isMacOSX - Is this a Mac OS X triple. More... | |
| bool | isiOS () const |
| Is this an iOS triple. More... | |
| bool | isTvOS () const |
| Is this an Apple tvOS triple. More... | |
| bool | isWatchOS () const |
| Is this an Apple watchOS triple. More... | |
| bool | isWatchABI () const |
| bool | isOSDarwin () const |
| isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS). More... | |
| bool | isOSNetBSD () const |
| bool | isOSOpenBSD () const |
| bool | isOSFreeBSD () const |
| bool | isOSFuchsia () const |
| bool | isOSDragonFly () const |
| bool | isOSSolaris () const |
| bool | isOSBitrig () const |
| bool | isOSIAMCU () const |
| bool | isGNUEnvironment () const |
| bool | isOSContiki () const |
| bool | isWindowsMSVCEnvironment () const |
| Checks if the environment could be MSVC. More... | |
| bool | isKnownWindowsMSVCEnvironment () const |
| Checks if the environment is MSVC. More... | |
| bool | isWindowsCoreCLREnvironment () const |
| bool | isWindowsItaniumEnvironment () const |
| bool | isWindowsCygwinEnvironment () const |
| bool | isWindowsGNUEnvironment () const |
| bool | isOSCygMing () const |
| Tests for either Cygwin or MinGW OS. More... | |
| bool | isOSMSVCRT () const |
| Is this a "Windows" OS targeting a "MSVCRT.dll" environment. More... | |
| bool | isOSWindows () const |
| Tests whether the OS is Windows. More... | |
| bool | isOSNaCl () const |
| Tests whether the OS is NaCl (Native Client) More... | |
| bool | isOSLinux () const |
| Tests whether the OS is Linux. More... | |
| bool | isOSKFreeBSD () const |
| Tests whether the OS is kFreeBSD. More... | |
| bool | isOSGlibc () const |
| Tests whether the OS uses glibc. More... | |
| bool | isOSBinFormatELF () const |
| Tests whether the OS uses the ELF binary format. More... | |
| bool | isOSBinFormatCOFF () const |
| Tests whether the OS uses the COFF binary format. More... | |
| bool | isOSBinFormatMachO () const |
| Tests whether the environment is MachO. More... | |
| bool | isPS4CPU () const |
| Tests whether the target is the PS4 CPU. More... | |
| bool | isPS4 () const |
| Tests whether the target is the PS4 platform. More... | |
| bool | isAndroid () const |
| Tests whether the target is Android. More... | |
| bool | isMusl () const |
| Tests whether the environment is musl-libc. More... | |
| bool | isNVPTX () const |
| Tests whether the target is NVPTX (32- or 64-bit). More... | |
| bool | supportsCOMDAT () const |
| Tests wether the target supports comdat. More... | |
Mutators | |
| void | setArch (ArchType Kind) |
| setArch - Set the architecture (first) component of the triple to a known type. More... | |
| void | setVendor (VendorType Kind) |
| setVendor - Set the vendor (second) component of the triple to a known type. More... | |
| void | setOS (OSType Kind) |
| setOS - Set the operating system (third) component of the triple to a known type. More... | |
| void | setEnvironment (EnvironmentType Kind) |
| setEnvironment - Set the environment (fourth) component of the triple to a known type. More... | |
| void | setObjectFormat (ObjectFormatType Kind) |
| setObjectFormat - Set the object file format More... | |
| void | setTriple (const Twine &Str) |
setTriple - Set all components to the new triple Str. More... | |
| void | setArchName (StringRef Str) |
| setArchName - Set the architecture (first) component of the triple by name. More... | |
| void | setVendorName (StringRef Str) |
| setVendorName - Set the vendor (second) component of the triple by name. More... | |
| void | setOSName (StringRef Str) |
| setOSName - Set the operating system (third) component of the triple by name. More... | |
| void | setEnvironmentName (StringRef Str) |
| setEnvironmentName - Set the optional environment (fourth) component of the triple by name. More... | |
| void | setOSAndEnvironmentName (StringRef Str) |
| setOSAndEnvironmentName - Set the operating system and optional environment components with a single string. More... | |
Helpers to build variants of a particular triple. | |
| llvm::Triple | get32BitArchVariant () const |
| Form a triple with a 32-bit variant of the current architecture. More... | |
| llvm::Triple | get64BitArchVariant () const |
| Form a triple with a 64-bit variant of the current architecture. More... | |
| llvm::Triple | getBigEndianArchVariant () const |
| Form a triple with a big endian variant of the current architecture. More... | |
| llvm::Triple | getLittleEndianArchVariant () const |
| Form a triple with a little endian variant of the current architecture. More... | |
| StringRef | getARMCPUForArch (StringRef Arch=StringRef()) const |
| Get the (LLVM) name of the minimum ARM CPU for the arch we are targeting. More... | |
| bool | isLittleEndian () const |
| Tests whether the target triple is little endian. More... | |
Static Public Member Functions | |
Static helpers for IDs. | |
| static StringRef | getArchTypeName (ArchType Kind) |
getArchTypeName - Get the canonical name for the Kind architecture. More... | |
| static StringRef | getArchTypePrefix (ArchType Kind) |
getArchTypePrefix - Get the "prefix" canonical name for the Kind architecture. More... | |
| static StringRef | getVendorTypeName (VendorType Kind) |
getVendorTypeName - Get the canonical name for the Kind vendor. More... | |
| static StringRef | getOSTypeName (OSType Kind) |
getOSTypeName - Get the canonical name for the Kind operating system. More... | |
| static StringRef | getEnvironmentTypeName (EnvironmentType Kind) |
getEnvironmentTypeName - Get the canonical name for the Kind environment. More... | |
Static helpers for converting alternate architecture names. | |
| static ArchType | getArchTypeForLLVMName (StringRef Str) |
| getArchTypeForLLVMName - The canonical type for the given LLVM architecture name (e.g., "x86"). More... | |
Normalization | |
| std::string | normalize () const |
| Return the normalized form of this triple's string. More... | |
| static std::string | normalize (StringRef Str) |
| normalize - Turn an arbitrary machine specification into the canonical triple form (or something sensible that the Triple class understands if nothing better can reasonably be done). More... | |
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 |
|
inline |
Default constructor is the same as an empty string and leaves all triple fields unknown.
Definition at line 238 of file Triple.h.
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 658 of file Triple.cpp.
References getDefaultFormat(), parseArch(), parseEnvironment(), parseFormat(), parseOS(), parseSubArch(), parseVendor(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::StringRef::split(), 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 689 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 704 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 1214 of file Triple.cpp.
References aarch64, aarch64_be, amdgcn, amdil, amdil64, arm, armeb, avr, bpfeb, bpfel, getArch(), hexagon, hsail, hsail64, kalimba, lanai, le32, le64, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, renderscript32, renderscript64, riscv32, riscv64, setArch(), shave, sparc, sparcel, sparcv9, spir, spir64, systemz, T, tce, tcele, thumb, thumbeb, UnknownArch, wasm32, wasm64, x86, x86_64, and xcore.
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 1276 of file Triple.cpp.
References aarch64, aarch64_be, amdgcn, amdil, amdil64, arm, armeb, avr, bpfeb, bpfel, getArch(), hexagon, hsail, hsail64, kalimba, lanai, le32, le64, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, renderscript32, renderscript64, riscv32, riscv64, setArch(), shave, sparc, sparcel, sparcv9, spir, spir64, systemz, T, tce, tcele, thumb, thumbeb, UnknownArch, wasm32, wasm64, x86, x86_64, and xcore.
Referenced by llvm::sys::getProcessTriple().
|
inline |
getArch - Get the parsed architecture type of this triple.
Definition at line 270 of file Triple.h.
Referenced by llvm::AArch64MCAsmInfoELF::AArch64MCAsmInfoELF(), adjustCodeGenOpts(), llvm::AMDGPUMCAsmInfo::AMDGPUMCAsmInfo(), llvm::ARMELFMCAsmInfo::ARMELFMCAsmInfo(), llvm::ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(), llvm::BPFMCAsmInfo::BPFMCAsmInfo(), computeDataLayout(), computeFSAdditions(), llvm::MipsABIInfo::computeTargetABI(), computeTargetABI(), createELFStreamer(), llvm::orc::createLocalCompileCallbackManager(), llvm::orc::createLocalIndirectStubsManagerBuilder(), llvm::createPPCAsmBackend(), createPPCMCAsmInfo(), createPPCMCRegisterInfo(), createSparcMCSubtargetInfo(), createTLOF(), createX86MCAsmInfo(), createX86MCRegisterInfo(), emitDarwinBCHeaderAndTrailer(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitStartOfAsmFile(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), get32BitArchVariant(), get64BitArchVariant(), getBigEndianArchVariant(), getCOFFSectionFlags(), getDataLayoutString(), getDefaultFormat(), llvm::SubtargetFeatures::getDefaultSubtargetFeatures(), llvm::X86_MC::getDwarfRegFlavour(), getEffectiveRelocModel(), getGPUOrDefault(), getiOSVersion(), llvm::ARMAsmPrinter::getISAEncoding(), getLittleEndianArchVariant(), llvm::DataLayout::getManglingComponent(), hasSinCosPiStret(), initialize(), isArch16Bit(), isArch32Bit(), isArch64Bit(), isLittleEndian(), isNVPTX(), llvm::PPCTargetMachine::isPPC64(), isPS4CPU(), loadBinaryFormat(), llvm::TargetRegistry::lookupTarget(), llvm::MipsMCAsmInfo::MipsMCAsmInfo(), llvm::NVPTXMCAsmInfo::NVPTXMCAsmInfo(), llvm::ARM_MC::ParseARMTriple(), llvm::X86_MC::ParseX86Triple(), llvm::PPCELFMCAsmInfo::PPCELFMCAsmInfo(), llvm::MIPS_MC::selectMipsCPU(), llvm::EngineBuilder::selectTarget(), llvm::SparcELFMCAsmInfo::SparcELFMCAsmInfo(), triplesMatch(), useCompactUnwind(), llvm::X86ELFMCAsmInfo::X86ELFMCAsmInfo(), llvm::X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(), llvm::X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(), llvm::X86MCAsmInfoMicrosoft::X86MCAsmInfoMicrosoft(), and llvm::X86TargetMachine::X86TargetMachine().
| StringRef Triple::getArchName | ( | ) | const |
getArchName - Get the architecture (first) component of the triple.
Definition at line 903 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by llvm::createARMAsmBackend(), llvm::createX86_64AsmBackend(), getARMCPUForArch(), llvm::ARM_MC::ParseARMTriple(), setEnvironmentName(), setOSAndEnvironmentName(), setOSName(), and setVendorName().
|
static |
getArchTypeForLLVMName - The canonical type for the given LLVM architecture name (e.g., "x86").
Definition at line 249 of file Triple.cpp.
References aarch64, aarch64_be, amdgcn, amdil, amdil64, arm, armeb, avr, llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), hexagon, hsail, hsail64, kalimba, lanai, le32, le64, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, parseBPFArch(), ppc, ppc64, ppc64le, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparc, sparcel, sparcv9, spir, spir64, llvm::StringSwitch< T, R >::StartsWith(), systemz, tce, tcele, thumb, thumbeb, UnknownArch, wasm32, wasm64, x86, x86_64, and xcore.
Referenced by llvm::TargetRegistry::lookupTarget(), and llvm::EngineBuilder::selectTarget().
getArchTypeName - Get the canonical name for the Kind architecture.
Definition at line 20 of file Triple.cpp.
References aarch64, aarch64_be, amdgcn, amdil, amdil64, arm, armeb, avr, bpfeb, bpfel, hexagon, hsail, hsail64, kalimba, lanai, le32, le64, llvm_unreachable, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparc, sparcel, sparcv9, spir, spir64, systemz, tce, tcele, thumb, thumbeb, UnknownArch, wasm32, wasm64, x86, x86_64, and xcore.
Referenced by setArch().
getArchTypePrefix - 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 77 of file Triple.cpp.
References aarch64, aarch64_be, amdgcn, amdil, amdil64, arm, armeb, avr, bpfeb, bpfel, hexagon, hsail, hsail64, kalimba, lanai, le32, le64, mips, mips64, mips64el, mipsel, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, riscv32, riscv64, shave, sparc, sparcel, sparcv9, spir, spir64, systemz, thumb, thumbeb, wasm32, wasm64, x86, x86_64, and xcore.
Get the (LLVM) name of the minimum ARM CPU for the arch we are targeting.
| Arch | the architecture name (e.g., "armv7s"). If it is an empty string then the triple's arch name is used. |
Definition at line 1467 of file Triple.cpp.
References EABI, EABIHF, llvm::StringRef::empty(), FreeBSD, getArchName(), llvm::ARM::getCanonicalArchName(), llvm::ARM::getDefaultCPU(), getEnvironment(), getOS(), GNUEABI, GNUEABIHF, IOS, llvm_unreachable, MacOSX, MuslEABIHF, NaCl, NetBSD, TvOS, WatchOS, and Win32.
| 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 1338 of file Triple.cpp.
References aarch64, aarch64_be, amdgcn, amdil, amdil64, arm, avr, bpfeb, bpfel, getArch(), hexagon, hsail, hsail64, isLittleEndian(), kalimba, le32, le64, llvm_unreachable, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc64, ppc64le, r600, renderscript32, renderscript64, riscv32, riscv64, setArch(), shave, sparc, sparcel, spir, spir64, T, tce, tcele, thumb, UnknownArch, wasm32, wasm64, x86, x86_64, and xcore.
|
inline |
getEnvironment - Get the parsed environment type of this triple.
Definition at line 288 of file Triple.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), computeDataLayout(), computeTargetABI(), llvm::createX86_64AsmBackend(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), getARMCPUForArch(), getEnvironmentVersion(), isAndroid(), isGNUEnvironment(), isKnownWindowsMSVCEnvironment(), isMusl(), llvm::AMDGPUSubtarget::isOpenCLEnv(), llvm::X86Subtarget::isTarget64BitILP32(), llvm::X86Subtarget::isTarget64BitLP64(), llvm::ARMSubtarget::isTargetAEABI(), llvm::ARMSubtarget::isTargetEHABICompatible(), llvm::ARMSubtarget::isTargetGNUAEABI(), llvm::ARMSubtarget::isTargetHardFloat(), llvm::ARMSubtarget::isTargetMuslAEABI(), isWindowsCoreCLREnvironment(), isWindowsCygwinEnvironment(), isWindowsGNUEnvironment(), isWindowsItaniumEnvironment(), isWindowsMSVCEnvironment(), llvm::MipsMCAsmInfo::MipsMCAsmInfo(), llvm::X86_MC::ParseX86Triple(), llvm::X86ELFMCAsmInfo::X86ELFMCAsmInfo(), and llvm::X86RegisterInfo::X86RegisterInfo().
| StringRef Triple::getEnvironmentName | ( | ) | const |
getEnvironmentName - Get the optional environment (fourth) component of the triple, or "" if empty.
Definition at line 918 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by getEnvironmentVersion(), hasEnvironment(), and setOSName().
|
static |
getEnvironmentTypeName - Get the canonical name for the Kind environment.
Definition at line 208 of file Triple.cpp.
References AMDOpenCL, Android, CODE16, CoreCLR, Cygnus, EABIHF, GNU, GNUABI64, GNUEABI, GNUEABIHF, GNUX32, Itanium, llvm_unreachable, MSVC, Musl, MuslEABI, MuslEABIHF, OpenCL, and UnknownEnvironment.
Referenced by getEnvironmentVersion(), setEnvironment(), and setObjectFormat().
Parse the version number from the OS name component of the triple, if present.
For example, "fooos1.2.3" would return (1, 2, 3).
If an entry is not defined, it will be returned as 0.
Definition at line 964 of file Triple.cpp.
References getEnvironment(), getEnvironmentName(), getEnvironmentTypeName(), parseVersionFromName(), llvm::StringRef::size(), llvm::StringRef::startswith(), and llvm::StringRef::substr().
getiOSVersion - Parse the version number as with getOSVersion.
This should only be called with IOS or generic triples.
Definition at line 1026 of file Triple.cpp.
References aarch64, Darwin, getArch(), getOS(), getOSVersion(), IOS, llvm_unreachable, MacOSX, TvOS, and WatchOS.
Referenced by llvm::AsmPrinter::doInitialization(), and 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 1392 of file Triple.cpp.
References aarch64, aarch64_be, armeb, bpfeb, bpfel, getArch(), isLittleEndian(), lanai, llvm_unreachable, mips, mips64, mips64el, mipsel, ppc, ppc64, ppc64le, setArch(), sparc, sparcel, sparcv9, systemz, T, tce, tcele, thumbeb, and UnknownArch.
getMacOSXVersion - Parse the version number as with getOSVersion and then translate generic "darwin" versions to the corresponding OS X versions.
This may also be called with IOS triples but the OS X version number is just set to a constant 10.4.0 in that case. Returns true if successful.
Definition at line 985 of file Triple.cpp.
References Darwin, getOS(), getOSVersion(), IOS, llvm_unreachable, MacOSX, TvOS, and WatchOS.
Referenced by llvm::AsmPrinter::doInitialization().
|
inline |
getFormat - Get the object format for this triple.
Definition at line 300 of file Triple.h.
Referenced by llvm::createARMAsmBackend(), llvm::Target::createMCObjectStreamer(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), isOSBinFormatCOFF(), isOSBinFormatELF(), isOSBinFormatMachO(), and llvm::ARMTargetLowering::LowerOperation().
|
inline |
getOS - Get the parsed operating system type of this triple.
Definition at line 279 of file Triple.h.
Referenced by llvm::ARMELFMCAsmInfo::ARMELFMCAsmInfo(), computeTargetABI(), llvm::createAArch64beAsmBackend(), llvm::createAArch64leAsmBackend(), llvm::createARMAsmBackend(), llvm::createAVRAsmBackend(), llvm::createHexagonAsmBackend(), llvm::createLanaiAsmBackend(), llvm::orc::createLocalCompileCallbackManager(), llvm::orc::createLocalIndirectStubsManagerBuilder(), createMCStreamer(), llvm::createMipsAsmBackendEB32(), llvm::createMipsAsmBackendEB64(), llvm::createMipsAsmBackendEL32(), llvm::createMipsAsmBackendEL64(), llvm::createPPCAsmBackend(), llvm::createRISCVAsmBackend(), llvm::createSparcAsmBackend(), llvm::createSystemZMCAsmBackend(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), llvm::NVPTXAsmPrinter::doInitialization(), llvm::AMDGPUAsmPrinter::EmitStartOfAsmFile(), getARMCPUForArch(), getDataLayoutString(), getGPUOrDefault(), getiOSVersion(), getMacOSXVersion(), getOSVersion(), getWatchOSVersion(), initialize(), llvm::AMDGPUSubtarget::isAmdHsaOS(), isiOS(), isKnownWindowsMSVCEnvironment(), isMacOSX(), isMacOSXVersionLT(), llvm::AMDGPUSubtarget::isMesa3DOS(), isOSBitrig(), isOSContiki(), isOSDragonFly(), isOSFreeBSD(), isOSFuchsia(), isOSGlibc(), isOSIAMCU(), isOSKFreeBSD(), isOSLinux(), isOSNaCl(), isOSNetBSD(), isOSOpenBSD(), isOSSolaris(), isOSWindows(), isPS4(), isPS4CPU(), isTvOS(), isWatchOS(), isWindowsCoreCLREnvironment(), isWindowsCygwinEnvironment(), isWindowsGNUEnvironment(), isWindowsItaniumEnvironment(), isWindowsMSVCEnvironment(), llvm::NVPTXTargetMachine::NVPTXTargetMachine(), llvm::AMDGPU::shouldEmitConstantsToTextSection(), and triplesMatch().
| StringRef Triple::getOSAndEnvironmentName | ( | ) | const |
getOSAndEnvironmentName - Get the operating system and optional environment components as a single string (separated by a '-' if the environment component is present).
Definition at line 924 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by setArchName(), and setVendorName().
|
inline |
getOSMajorVersion - Return just the major version number, this is specialized because it is a common query.
Definition at line 312 of file Triple.h.
References getOSVersion(), and llvm::Min.
Referenced by llvm::AsmPrinter::doInitialization().
| StringRef Triple::getOSName | ( | ) | const |
getOSName - Get the operating system (third) component of the triple.
Definition at line 912 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by getOSVersion(), and setEnvironmentName().
getOSTypeName - Get the canonical name for the Kind operating system.
Definition at line 169 of file Triple.cpp.
References AIX, AMDHSA, Bitrig, CloudABI, CNK, Contiki, CUDA, Darwin, DragonFly, ELFIAMCU, FreeBSD, Fuchsia, Haiku, IOS, KFreeBSD, Linux, llvm_unreachable, Lv2, MacOSX, Mesa3D, Minix, NaCl, NetBSD, NVCL, OpenBSD, PS4, RTEMS, Solaris, TvOS, UnknownOS, WatchOS, and Win32.
Referenced by getOSVersion(), and setOS().
getOSVersion - Parse the version number from the OS name component of the triple, if present.
For example, "fooos1.2.3" would return (1, 2, 3).
If an entry is not defined, it will be returned as 0.
Definition at line 974 of file Triple.cpp.
References getOS(), getOSName(), getOSTypeName(), parseVersionFromName(), llvm::StringRef::size(), llvm::StringRef::startswith(), and llvm::StringRef::substr().
Referenced by llvm::createMachOStreamer(), getiOSVersion(), getMacOSXVersion(), getOSMajorVersion(), getWatchOSVersion(), and isOSVersionLT().
|
inline |
getSubArch - get the parsed subarchitecture type for this triple.
Definition at line 273 of file Triple.h.
Referenced by llvm::ARMAsmPrinter::EmitStartOfAsmFile(), llvm::ARMAsmPrinter::getISAEncoding(), isWatchABI(), and triplesMatch().
|
inline |
Definition at line 341 of file Triple.h.
Referenced by llvm::TargetRegistry::lookupTarget(), and llvm::EngineBuilder::selectTarget().
|
inline |
getVendor - Get the parsed vendor type of this triple.
Definition at line 276 of file Triple.h.
Referenced by llvm::SubtargetFeatures::getDefaultSubtargetFeatures(), llvm::PPCSubtarget::isBGQ(), isPS4(), isPS4CPU(), mergeTriples(), and triplesMatch().
| StringRef Triple::getVendorName | ( | ) | const |
getVendorName - Get the vendor (second) component of the triple.
Definition at line 907 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by setArchName(), setEnvironmentName(), setOSAndEnvironmentName(), and setOSName().
|
static |
getVendorTypeName - Get the canonical name for the Kind vendor.
Definition at line 146 of file Triple.cpp.
References AMD, Apple, BGP, BGQ, CSR, Freescale, IBM, ImaginationTechnologies, llvm_unreachable, Mesa, MipsTechnologies, Myriad, NVIDIA, PC, SCEI, and UnknownVendor.
Referenced by setVendor().
getWatchOSVersion - Parse the version number as with getOSVersion.
This should only be called with WatchOS or generic triples.
Definition at line 1052 of file Triple.cpp.
References Darwin, getOS(), getOSVersion(), IOS, llvm_unreachable, MacOSX, and WatchOS.
Referenced by llvm::AsmPrinter::doInitialization().
|
inline |
hasEnvironment - Does this triple have the optional environment (fourth) component?
Definition at line 283 of file Triple.h.
References getEnvironmentName().
Referenced by setOSName().
|
inline |
Tests whether the target is Android.
Definition at line 593 of file Triple.h.
References Android, and getEnvironment().
Referenced by llvm::TargetLoweringBase::getSafeStackPointerLocation(), llvm::AArch64Subtarget::isTargetAndroid(), llvm::X86Subtarget::isTargetAndroid(), and llvm::ARMSubtarget::isTargetAndroid().
| 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 1210 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 1206 of file Triple.cpp.
References getArch(), and getArchPointerBitWidth().
Referenced by computeDataLayout(), and llvm::sys::getProcessTriple().
| 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 1202 of file Triple.cpp.
References getArch(), and getArchPointerBitWidth().
Referenced by computeDataLayout(), llvm::createRISCVAsmBackend(), llvm::createWebAssemblyAsmBackend(), llvm::WebAssemblyRegisterInfo::getFrameRegister(), llvm::sys::getProcessTriple(), llvm::WebAssemblySubtarget::hasAddr64(), llvm::RISCVMCAsmInfo::RISCVMCAsmInfo(), llvm::WebAssemblyMCAsmInfo::WebAssemblyMCAsmInfo(), and llvm::X86RegisterInfo::X86RegisterInfo().
|
inline |
Definition at line 489 of file Triple.h.
References getEnvironment(), GNU, GNUABI64, GNUEABI, GNUEABIHF, and GNUX32.
Referenced by canCombineSinCosLibcall(), and InitLibcallNames().
|
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 436 of file Triple.h.
References getOS(), IOS, and isTvOS().
Referenced by llvm::createMachOStreamer(), hasSinCosPiStret(), initialize(), isOSDarwin(), llvm::AArch64Subtarget::isTargetIOS(), llvm::ARMSubtarget::isTargetIOS(), llvm::EngineBuilder::selectTarget(), llvm::AArch64Subtarget::supportsAddressTopByteIgnored(), and useCompactUnwind().
|
inline |
Checks if the environment is MSVC.
Definition at line 508 of file Triple.h.
References getEnvironment(), getOS(), MSVC, and Win32.
Referenced by createTLOF(), llvm::AsmPrinter::doInitialization(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::TargetLoweringObjectFileCOFF::emitLinkerFlagsForGlobal(), llvm::TargetLoweringObjectFileCOFF::Initialize(), and llvm::X86Subtarget::isTargetKnownWindowsMSVC().
| bool Triple::isLittleEndian | ( | ) | const |
Tests whether the target triple is little endian.
Definition at line 1424 of file Triple.cpp.
References aarch64, amdgcn, amdil, amdil64, arm, avr, bpfel, getArch(), hexagon, hsail, hsail64, kalimba, le32, le64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc64le, r600, renderscript32, renderscript64, riscv32, riscv64, shave, sparcel, spir, spir64, tcele, thumb, wasm32, wasm64, x86, x86_64, and xcore.
Referenced by getBigEndianArchVariant(), and getLittleEndianArchVariant().
|
inline |
isMacOSX - Is this a Mac OS X triple.
For legacy reasons, we support both "darwin" and "osx" as OS X triples.
Definition at line 427 of file Triple.h.
References Darwin, getOS(), and MacOSX.
Referenced by computeTargetABI(), llvm::createMachOStreamer(), createPPCAsmPrinterPass(), llvm::AsmPrinter::doInitialization(), getEffectiveRelocModel(), llvm::X86Subtarget::hasSinCos(), hasSinCosPiStret(), initialize(), llvm::PPCSubtarget::isDarwin(), isMacOSXVersionLT(), isOSDarwin(), llvm::PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(), useCompactUnwind(), and llvm::X86MCAsmInfoDarwin::X86MCAsmInfoDarwin().
|
inline |
isMacOSXVersionLT - Comparison function for checking OS X version compatibility, which handles supporting skewed version numbering schemes used by the "darwin" triples.
Definition at line 412 of file Triple.h.
References assert(), getOS(), isMacOSX(), isOSVersionLT(), and MacOSX.
Referenced by llvm::X86Subtarget::hasSinCos(), hasSinCosPiStret(), initialize(), llvm::PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(), useCompactUnwind(), and llvm::X86MCAsmInfoDarwin::X86MCAsmInfoDarwin().
|
inline |
Tests whether the environment is musl-libc.
Definition at line 596 of file Triple.h.
References getEnvironment(), Musl, MuslEABI, and MuslEABIHF.
|
inline |
|
inline |
Tests whether the OS uses the COFF binary format.
Definition at line 570 of file Triple.h.
References COFF, and getObjectFormat().
Referenced by createTLOF(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::DataLayout::getManglingComponent(), llvm::AArch64Subtarget::isTargetCOFF(), llvm::X86Subtarget::isTargetCOFF(), llvm::ARMSubtarget::isTargetCOFF(), and llvm::TargetMachine::shouldAssumeDSOLocal().
|
inline |
Tests whether the OS uses the ELF binary format.
Definition at line 565 of file Triple.h.
References ELF, and getObjectFormat().
Referenced by adjustCodeGenOpts(), llvm::createAArch64beAsmBackend(), llvm::createAArch64leAsmBackend(), createAArch64MCAsmInfo(), llvm::createAArch64ObjectTargetStreamer(), llvm::createARMAsmBackend(), llvm::createARMObjectTargetStreamer(), llvm::createLanaiAsmBackend(), createMCStreamer(), createObjectTargetStreamer(), createTLOF(), createX86MCAsmInfo(), llvm::AsmPrinter::doFinalization(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::ARMAsmPrinter::EmitStartOfAsmFile(), llvm::AsmPrinter::emitXRayTable(), getEffectiveRelocModel(), llvm::AArch64RegisterInfo::getTLSCallPreservedMask(), llvm::SystemZSubtarget::isTargetELF(), llvm::AArch64Subtarget::isTargetELF(), llvm::PPCSubtarget::isTargetELF(), llvm::X86Subtarget::isTargetELF(), llvm::ARMSubtarget::isTargetELF(), llvm::AArch64MCInstLower::LowerSymbolOperand(), and llvm::TargetMachine::shouldAssumeDSOLocal().
|
inline |
Tests whether the environment is MachO.
Definition at line 575 of file Triple.h.
References getObjectFormat(), and MachO.
Referenced by adjustCodeGenOpts(), computeDataLayout(), computeTargetABI(), llvm::createAArch64leAsmBackend(), createAArch64MCAsmInfo(), createARMMCAsmInfo(), createARMMCRelocationInfo(), createTLOF(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), createX86MCAsmInfo(), llvm::ARMAsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitEndOfAsmFile(), llvm::X86AsmPrinter::EmitStartOfAsmFile(), llvm::AsmPrinter::emitXRayTable(), getEffectiveRelocModel(), llvm::ARMAsmPrinter::getISAEncoding(), llvm::DataLayout::getManglingComponent(), llvm::AArch64Subtarget::isTargetMachO(), llvm::PPCSubtarget::isTargetMachO(), llvm::X86Subtarget::isTargetMachO(), llvm::ARMSubtarget::isTargetMachO(), llvm::TargetMachine::shouldAssumeDSOLocal(), and supportsCOMDAT().
|
inline |
|
inline |
Definition at line 496 of file Triple.h.
References Contiki, and getOS().
Referenced by llvm::X86TargetLowering::getSafeStackPointerLocation().
|
inline |
Tests for either Cygwin or MinGW OS.
Definition at line 529 of file Triple.h.
References isWindowsCygwinEnvironment(), and isWindowsGNUEnvironment().
Referenced by createX86MCAsmInfo(), llvm::X86_MC::getDwarfRegFlavour(), initialize(), and llvm::X86Subtarget::isTargetCygMing().
|
inline |
isOSDarwin - Is this a "Darwin" OS (OS X, iOS, or watchOS).
Definition at line 455 of file Triple.h.
References isiOS(), isMacOSX(), and isWatchOS().
Referenced by adjustCodeGenOpts(), llvm::ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(), computeDataLayout(), createARMMCAsmInfo(), llvm::createMachOStreamer(), llvm::createPPCAsmBackend(), createPPCMCAsmInfo(), createPPCMCInstPrinter(), createTLOF(), llvm::AsmPrinter::doInitialization(), getDataLayoutString(), getDefaultFormat(), llvm::X86_MC::getDwarfRegFlavour(), getEffectiveRelocModel(), llvm::AArch64RegisterInfo::getRegPressureLimit(), llvm::AArch64RegisterInfo::getReservedRegs(), llvm::AArch64RegisterInfo::getTLSCallPreservedMask(), hasSinCosPiStret(), InitLibcallNames(), llvm::AArch64RegisterInfo::isReservedReg(), llvm::AArch64Subtarget::isTargetDarwin(), llvm::X86Subtarget::isTargetDarwin(), llvm::ARMSubtarget::isTargetDarwin(), llvm::AArch64MCInstLower::LowerSymbolOperand(), shouldLowerMemFuncForSize(), and useCompactUnwind().
|
inline |
Definition at line 475 of file Triple.h.
References DragonFly, and getOS().
Referenced by llvm::X86Subtarget::isTargetDragonFly().
|
inline |
Definition at line 467 of file Triple.h.
References FreeBSD, and getOS().
Referenced by createTLOF(), initialize(), and llvm::X86Subtarget::isTargetFreeBSD().
|
inline |
Definition at line 471 of file Triple.h.
References Fuchsia, and getOS().
Referenced by createTLOF().
|
inline |
|
inline |
Definition at line 485 of file Triple.h.
References ELFIAMCU, and getOS().
Referenced by computeDataLayout(), llvm::createX86_32AsmBackend(), and llvm::X86Subtarget::isTargetMCU().
|
inline |
Tests whether the OS is kFreeBSD.
Definition at line 555 of file Triple.h.
References getOS(), and KFreeBSD.
Referenced by llvm::X86Subtarget::isTargetKFreeBSD().
|
inline |
Tests whether the OS is Linux.
Definition at line 550 of file Triple.h.
References getOS(), and Linux.
Referenced by createTLOF(), initialize(), llvm::SparcSubtarget::isTargetLinux(), llvm::AArch64Subtarget::isTargetLinux(), llvm::PPCSubtarget::isTargetLinux(), llvm::X86Subtarget::isTargetLinux(), and llvm::ARMSubtarget::isTargetLinux().
|
inline |
Is this a "Windows" OS targeting a "MSVCRT.dll" environment.
Definition at line 534 of file Triple.h.
References isWindowsGNUEnvironment(), isWindowsItaniumEnvironment(), and isWindowsMSVCEnvironment().
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), computeBytesPoppedByCalleeForSRet(), llvm::X86TargetLowering::getSDagStackGuard(), llvm::X86TargetLowering::getSSPStackGuardCheck(), llvm::X86TargetLowering::insertSSPDeclarations(), and LowerFPOWI().
|
inline |
Tests whether the OS is NaCl (Native Client)
Definition at line 545 of file Triple.h.
Referenced by computeDataLayout(), createMCStreamer(), createTLOF(), llvm::X86Subtarget::isTarget64BitILP32(), llvm::X86Subtarget::isTarget64BitLP64(), llvm::MipsSubtarget::isTargetNaCl(), llvm::X86Subtarget::isTargetNaCl(), llvm::ARMSubtarget::isTargetNaCl(), and llvm::ARM_MC::ParseARMTriple().
|
inline |
Definition at line 459 of file Triple.h.
References getOS(), and NetBSD.
Referenced by computeTargetABI(), and llvm::ARMSubtarget::isTargetNetBSD().
|
inline |
Definition at line 463 of file Triple.h.
References getOS(), and OpenBSD.
Referenced by InitLibcallNames().
|
inline |
Definition at line 477 of file Triple.h.
References getOS(), and Solaris.
Referenced by llvm::X86Subtarget::isTargetSolaris().
|
inline |
isOSVersionLT - Helper function for doing comparisons against version numbers included in the target triple.
Definition at line 388 of file Triple.h.
References getOSVersion().
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::ARMSubtarget::hasSinCos(), hasSinCosPiStret(), initialize(), isMacOSXVersionLT(), isOSVersionLT(), and mergeTriples().
Definition at line 403 of file Triple.h.
References getOSVersion(), and isOSVersionLT().
|
inline |
Tests whether the OS is Windows.
Definition at line 540 of file Triple.h.
References getOS(), and Win32.
Referenced by computeDataLayout(), computeTargetABI(), llvm::createARMAsmBackend(), createARMMCAsmInfo(), llvm::Target::createMCObjectStreamer(), createTLOF(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), getDefaultFormat(), getEffectiveRelocModel(), llvm::DataLayout::getManglingComponent(), initialize(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), llvm::X86Subtarget::isOSWindows(), llvm::X86Subtarget::isTargetWin64(), llvm::AArch64Subtarget::isTargetWindows(), llvm::ARMSubtarget::isTargetWindows(), llvm::TargetMachine::shouldAssumeDSOLocal(), llvm::X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(), llvm::X86RegisterInfo::X86RegisterInfo(), and llvm::X86TargetMachine::X86TargetMachine().
|
inline |
Tests whether the target is the PS4 platform.
Definition at line 587 of file Triple.h.
References getOS(), getVendor(), PS4, and SCEI.
Referenced by llvm::X86TargetMachine::X86TargetMachine().
|
inline |
Tests whether the target is the PS4 CPU.
Definition at line 580 of file Triple.h.
References getArch(), getOS(), getVendor(), PS4, SCEI, and x86_64.
Referenced by llvm::DwarfDebug::DwarfDebug(), and llvm::X86Subtarget::isTargetPS4().
|
inline |
Is this an Apple tvOS triple.
Definition at line 441 of file Triple.h.
Referenced by llvm::createMachOStreamer(), llvm::AsmPrinter::doInitialization(), and isiOS().
|
inline |
Definition at line 450 of file Triple.h.
References ARMSubArch_v7k, and getSubArch().
Referenced by llvm::ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(), computeTargetABI(), llvm::ARMSubtarget::isTargetWatchABI(), and useCompactUnwind().
|
inline |
Is this an Apple watchOS triple.
Definition at line 446 of file Triple.h.
References getOS(), and WatchOS.
Referenced by llvm::createMachOStreamer(), llvm::AsmPrinter::doInitialization(), initialize(), isOSDarwin(), and llvm::ARMSubtarget::isTargetWatchOS().
|
inline |
Definition at line 512 of file Triple.h.
References CoreCLR, getEnvironment(), getOS(), and Win32.
Referenced by createTLOF(), createX86MCAsmInfo(), and llvm::X86Subtarget::isTargetWindowsCoreCLR().
|
inline |
Definition at line 520 of file Triple.h.
References Cygnus, getEnvironment(), getOS(), and Win32.
Referenced by llvm::TargetLoweringObjectFileCOFF::emitLinkerFlagsForGlobal(), isOSCygMing(), and llvm::X86Subtarget::isTargetWindowsCygwin().
|
inline |
Definition at line 524 of file Triple.h.
References getEnvironment(), getOS(), GNU, and Win32.
Referenced by llvm::TargetLoweringObjectFileCOFF::emitLinkerFlagsForGlobal(), isOSCygMing(), isOSMSVCRT(), and llvm::X86Subtarget::isTargetWindowsGNU().
|
inline |
Definition at line 516 of file Triple.h.
References getEnvironment(), getOS(), Itanium, and Win32.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), createX86MCAsmInfo(), llvm::AsmPrinter::doInitialization(), llvm::TargetLoweringObjectFileCOFF::Initialize(), isOSMSVCRT(), llvm::X86Subtarget::isTargetWindowsItanium(), and llvm::ARMTargetLowering::LowerOperation().
|
inline |
Checks if the environment could be MSVC.
Definition at line 501 of file Triple.h.
References getEnvironment(), getOS(), MSVC, UnknownEnvironment, and Win32.
Referenced by createARMMCAsmInfo(), createX86MCAsmInfo(), isOSMSVCRT(), and llvm::X86Subtarget::isTargetWindowsMSVC().
|
static |
normalize - Turn an arbitrary machine specification into the canonical triple form (or something sensible that the Triple class understands if nothing better can reasonably be done).
In particular, it handles the common case in which otherwise valid components are in the wrong order.
Definition at line 718 of file Triple.cpp.
References Android, llvm::array_lengthof(), assert(), COFF, llvm::StringRef::empty(), getObjectFormatTypeName(), i, llvm_unreachable, parseArch(), parseEnvironment(), parseFormat(), parseOS(), parseVendor(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorImpl< T >::resize(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::StringRef::split(), llvm::StringRef::startswith(), llvm::sys::fs::startswith(), llvm::Twine::str(), std::swap(), UnknownArch, UnknownEnvironment, UnknownObjectFormat, UnknownOS, UnknownVendor, and Win32.
|
inline |
Return the normalized form of this triple's string.
Definition at line 263 of file Triple.h.
References normalize().
Referenced by llvm::sys::getProcessTriple(), and normalize().
| void Triple::setArch | ( | ArchType | Kind | ) |
setArch - Set the architecture (first) component of the triple to a known type.
Definition at line 1080 of file Triple.cpp.
References getArchTypeName(), and setArchName().
Referenced by get32BitArchVariant(), get64BitArchVariant(), getBigEndianArchVariant(), getLittleEndianArchVariant(), llvm::TargetRegistry::lookupTarget(), and llvm::EngineBuilder::selectTarget().
| void Triple::setArchName | ( | StringRef | Str | ) |
setArchName - Set the architecture (first) component of the triple by name.
Definition at line 1108 of file Triple.cpp.
References getOSAndEnvironmentName(), getVendorName(), setTriple(), and Triple().
Referenced by setArch().
| void Triple::setEnvironment | ( | EnvironmentType | Kind | ) |
setEnvironment - Set the environment (fourth) component of the triple to a known type.
Definition at line 1092 of file Triple.cpp.
References getDefaultFormat(), getEnvironmentTypeName(), getObjectFormatTypeName(), setEnvironmentName(), and str().
| void Triple::setEnvironmentName | ( | StringRef | Str | ) |
setEnvironmentName - Set the optional environment (fourth) component of the triple by name.
Definition at line 1131 of file Triple.cpp.
References getArchName(), getOSName(), getVendorName(), and setTriple().
Referenced by setEnvironment(), and setObjectFormat().
| void Triple::setObjectFormat | ( | ObjectFormatType | Kind | ) |
setObjectFormat - Set the object file format
Definition at line 1100 of file Triple.cpp.
References getEnvironmentTypeName(), getObjectFormatTypeName(), setEnvironmentName(), str(), and UnknownEnvironment.
| void Triple::setOS | ( | OSType | Kind | ) |
setOS - Set the operating system (third) component of the triple to a known type.
Definition at line 1088 of file Triple.cpp.
References getOSTypeName(), and setOSName().
| void Triple::setOSAndEnvironmentName | ( | StringRef | Str | ) |
setOSAndEnvironmentName - Set the operating system and optional environment components with a single string.
Definition at line 1136 of file Triple.cpp.
References getArchName(), getVendorName(), and setTriple().
| void Triple::setOSName | ( | StringRef | Str | ) |
setOSName - Set the operating system (third) component of the triple by name.
Definition at line 1123 of file Triple.cpp.
References getArchName(), getEnvironmentName(), getVendorName(), hasEnvironment(), and setTriple().
Referenced by setOS().
setTriple - Set all components to the new triple Str.
Definition at line 1076 of file Triple.cpp.
References Triple().
Referenced by llvm::EngineBuilder::selectTarget(), setArchName(), setEnvironmentName(), setOSAndEnvironmentName(), setOSName(), and setVendorName().
| void Triple::setVendor | ( | VendorType | Kind | ) |
setVendor - Set the vendor (second) component of the triple to a known type.
Definition at line 1084 of file Triple.cpp.
References getVendorTypeName(), and setVendorName().
| void Triple::setVendorName | ( | StringRef | Str | ) |
setVendorName - Set the vendor (second) component of the triple by name.
Definition at line 1119 of file Triple.cpp.
References getArchName(), getOSAndEnvironmentName(), and setTriple().
Referenced by setVendor().
|
inline |
Definition at line 339 of file Triple.h.
Referenced by llvm::ThinLTOCodeGenerator::addModule(), llvm::ModuleSymbolTable::CollectAsmSymbols(), llvm::TargetMachineBuilder::create(), llvm::AsmPrinter::doInitialization(), llvm::AMDGPUAsmPrinter::EmitStartOfAsmFile(), llvm::sys::getProcessTriple(), mergeTriples(), setEnvironment(), and setObjectFormat().
|
inline |
Tests wether the target supports comdat.
Definition at line 608 of file Triple.h.
References isOSBinFormatMachO().
1.8.6