LLVM API Documentation
#include <Triple.h>
Public Types | |
enum | ArchType { UnknownArch, arm, armeb, aarch64, aarch64_be, hexagon, mips, mipsel, mips64, mips64el, msp430, ppc, ppc64, ppc64le, r600, sparc, sparcv9, systemz, tce, thumb, thumbeb, x86, x86_64, xcore, nvptx, nvptx64, le32, le64, amdil, spir, spir64, kalimba } |
enum | SubArchType { NoSubArch, ARMSubArch_v8, ARMSubArch_v7, ARMSubArch_v7em, ARMSubArch_v7m, ARMSubArch_v7s, ARMSubArch_v6, ARMSubArch_v6m, ARMSubArch_v6t2, ARMSubArch_v5, ARMSubArch_v5te, ARMSubArch_v4t, KalimbaSubArch_v3, KalimbaSubArch_v4, KalimbaSubArch_v5 } |
enum | VendorType { UnknownVendor, Apple, PC, SCEI, BGP, BGQ, Freescale, IBM, ImaginationTechnologies, MipsTechnologies, NVIDIA, CSR } |
enum | OSType { UnknownOS, Darwin, DragonFly, FreeBSD, IOS, KFreeBSD, Linux, Lv2, MacOSX, NetBSD, OpenBSD, Solaris, Win32, Haiku, Minix, RTEMS, NaCl, CNK, Bitrig, AIX, CUDA, NVCL } |
enum | EnvironmentType { UnknownEnvironment, GNU, GNUEABI, GNUEABIHF, GNUX32, CODE16, EABI, EABIHF, Android, MSVC, Itanium, Cygnus } |
enum | ObjectFormatType { UnknownObjectFormat, COFF, ELF, MachO } |
Public Member Functions | |
ArchType | getArch () const |
getArch - Get the parsed architecture type of this triple. | |
SubArchType | getSubArch () const |
getSubArch - get the parsed subarchitecture type for this triple. | |
VendorType | getVendor () const |
getVendor - Get the parsed vendor type of this triple. | |
OSType | getOS () const |
getOS - Get the parsed operating system type of this triple. | |
bool | hasEnvironment () const |
EnvironmentType | getEnvironment () const |
getEnvironment - Get the parsed environment type of this triple. | |
ObjectFormatType | getObjectFormat () const |
getFormat - Get the object format for this triple. | |
void | getOSVersion (unsigned &Major, unsigned &Minor, unsigned &Micro) const |
unsigned | getOSMajorVersion () const |
bool | getMacOSXVersion (unsigned &Major, unsigned &Minor, unsigned &Micro) const |
void | getiOSVersion (unsigned &Major, unsigned &Minor, unsigned &Micro) const |
const std::string & | str () const |
const std::string & | getTriple () const |
StringRef | getArchName () const |
StringRef | getVendorName () const |
getVendorName - Get the vendor (second) component of the triple. | |
StringRef | getOSName () const |
StringRef | getEnvironmentName () const |
StringRef | getOSAndEnvironmentName () const |
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 |
unsigned | isMacOSXVersionLT (unsigned Major, unsigned Minor=0, unsigned Micro=0) const |
bool | isMacOSX () const |
bool | isiOS () const |
Is this an iOS triple. | |
bool | isOSDarwin () const |
isOSDarwin - Is this a "Darwin" OS (OS X or iOS). | |
bool | isOSFreeBSD () const |
bool | isWindowsMSVCEnvironment () const |
bool | isKnownWindowsMSVCEnvironment () 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 | isOSWindows () const |
Tests whether the OS is Windows. | |
bool | isOSNaCl () const |
Tests whether the OS is NaCl (Native Client) | |
bool | isOSLinux () const |
Tests whether the OS is Linux. | |
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 | isOSBinFormatMachO () const |
Tests whether the environment is MachO. | |
void | setArch (ArchType Kind) |
void | setVendor (VendorType Kind) |
void | setOS (OSType Kind) |
void | setEnvironment (EnvironmentType Kind) |
void | setObjectFormat (ObjectFormatType Kind) |
setObjectFormat - Set the object file format | |
void | setTriple (const Twine &Str) |
setTriple - Set all components to the new triple Str . | |
void | setArchName (StringRef Str) |
void | setVendorName (StringRef Str) |
void | setOSName (StringRef Str) |
void | setEnvironmentName (StringRef Str) |
void | setOSAndEnvironmentName (StringRef Str) |
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. | |
const char * | getARMCPUForArch (StringRef Arch=StringRef()) const |
Constructors | |
Triple () | |
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. | |
Static Public Member Functions | |
static std::string | normalize (StringRef Str) |
static const char * | getArchTypeName (ArchType Kind) |
getArchTypeName - Get the canonical name for the Kind architecture. | |
static const char * | getArchTypePrefix (ArchType Kind) |
static const char * | getVendorTypeName (VendorType Kind) |
getVendorTypeName - Get the canonical name for the Kind vendor. | |
static const char * | getOSTypeName (OSType Kind) |
getOSTypeName - Get the canonical name for the Kind operating system. | |
static const char * | getEnvironmentTypeName (EnvironmentType Kind) |
static ArchType | getArchTypeForLLVMName (StringRef Str) |
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 |
llvm::Triple::Triple | ( | ) | [inline] |
Default constructor is the same as an empty string and leaves all triple fields unknown.
Definition at line 191 of file Triple.h.
Referenced by setArchName(), and setTriple().
Triple::Triple | ( | const Twine & | Str | ) | [explicit] |
Construct a triple from the string representation provided.
This stores the string representation and parses the various pieces into enum members.
Definition at line 372 of file Triple.cpp.
References getDefaultFormat(), 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 390 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 405 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 841 of file Triple.cpp.
References aarch64, aarch64_be, amdil, arm, armeb, getArch(), hexagon, kalimba, le32, le64, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, setArch(), sparc, sparcv9, spir, spir64, systemz, T, tce, thumb, thumbeb, UnknownArch, 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 886 of file Triple.cpp.
References aarch64, aarch64_be, amdil, arm, armeb, getArch(), hexagon, kalimba, le32, le64, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, setArch(), sparc, sparcv9, spir, spir64, systemz, T, tce, thumb, thumbeb, UnknownArch, x86, x86_64, and xcore.
Referenced by llvm::sys::getProcessTriple().
ArchType llvm::Triple::getArch | ( | ) | const [inline] |
getArch - Get the parsed architecture type of this triple.
Definition at line 209 of file Triple.h.
Referenced by llvm::AArch64MCAsmInfoELF::AArch64MCAsmInfoELF(), llvm::ARMELFMCAsmInfo::ARMELFMCAsmInfo(), llvm::ARMMCAsmInfoDarwin::ARMMCAsmInfoDarwin(), createMCStreamer(), llvm::createPPCAsmBackend(), createPPCMCAsmInfo(), llvm::createPPCMCCodeEmitter(), createPPCMCCodeGenInfo(), createPPCMCRegisterInfo(), createSparcMCSubtargetInfo(), createTLOF(), createX86MCAsmInfo(), createX86MCCodeGenInfo(), createX86MCRegisterInfo(), createX86MCRelocationInfo(), llvm::AsmPrinter::doFinalization(), EmitDarwinBCHeaderAndTrailer(), get32BitArchVariant(), get64BitArchVariant(), getDataLayoutString(), llvm::SubtargetFeatures::getDefaultSubtargetFeatures(), llvm::X86_MC::getDwarfRegFlavour(), getiOSVersion(), llvm::DataLayout::getManglingComponent(), hasSinCosPiStret(), initialize(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), isArch16Bit(), isArch32Bit(), isArch64Bit(), llvm::TargetRegistry::lookupTarget(), llvm::MipsMCAsmInfo::MipsMCAsmInfo(), llvm::NVPTXMCAsmInfo::NVPTXMCAsmInfo(), llvm::ARM_MC::ParseARMTriple(), llvm::X86_MC::ParseX86Triple(), llvm::PPCELFMCAsmInfo::PPCELFMCAsmInfo(), selectMipsCPU(), llvm::EngineBuilder::selectTarget(), llvm::SparcELFMCAsmInfo::SparcELFMCAsmInfo(), useCompactUnwind(), llvm::X86ELFMCAsmInfo::X86ELFMCAsmInfo(), llvm::X86MCAsmInfoDarwin::X86MCAsmInfoDarwin(), llvm::X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF(), and llvm::X86MCAsmInfoMicrosoft::X86MCAsmInfoMicrosoft().
StringRef Triple::getArchName | ( | ) | const |
getArchName - Get the architecture (first) component of the triple.
Definition at line 594 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by llvm::createARMAsmBackend(), llvm::createX86_64AsmBackend(), llvm::object::MachOUniversalBinary::ObjectForArch::getArchTypeName(), getARMCPUForArch(), setEnvironmentName(), setOSAndEnvironmentName(), setOSName(), and setVendorName().
Triple::ArchType Triple::getArchTypeForLLVMName | ( | StringRef | Str | ) | [static] |
getArchTypeForLLVMName - The canonical type for the given LLVM architecture name (e.g., "x86").
Definition at line 175 of file Triple.cpp.
References aarch64, aarch64_be, amdil, arm, armeb, llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), hexagon, kalimba, le32, le64, mips, mips64, mips64el, mipsel, msp430, Name, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, sparc, sparcv9, spir, spir64, systemz, tce, thumb, thumbeb, UnknownArch, x86, x86_64, and xcore.
Referenced by llvm::TargetRegistry::lookupTarget(), and llvm::EngineBuilder::selectTarget().
const char * Triple::getArchTypeName | ( | ArchType | Kind | ) | [static] |
getArchTypeName - Get the canonical name for the Kind
architecture.
Definition at line 18 of file Triple.cpp.
References aarch64, aarch64_be, amdil, arm, armeb, hexagon, kalimba, le32, le64, llvm_unreachable, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, sparc, sparcv9, spir, spir64, systemz, tce, thumb, thumbeb, UnknownArch, x86, x86_64, and xcore.
Referenced by setArch().
const char * Triple::getArchTypePrefix | ( | ArchType | Kind | ) | [static] |
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 58 of file Triple.cpp.
References aarch64, aarch64_be, amdil, arm, armeb, hexagon, kalimba, le32, le64, mips, mips64, mips64el, mipsel, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, sparc, sparcv9, spir, spir64, systemz, thumb, thumbeb, x86, x86_64, and xcore.
const char * Triple::getARMCPUForArch | ( | StringRef | Arch = StringRef() | ) | const |
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 932 of file Triple.cpp.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), llvm::StringSwitch< T, R >::Default(), EABI, EABIHF, llvm::StringRef::empty(), FreeBSD, getArchName(), getEnvironment(), getOS(), GNUEABI, GNUEABIHF, MArch(), NetBSD, llvm::StringRef::npos, llvm::StringRef::startswith(), llvm::StringRef::substr(), and Win32.
EnvironmentType llvm::Triple::getEnvironment | ( | ) | const [inline] |
getEnvironment - Get the parsed environment type of this triple.
Definition at line 227 of file Triple.h.
Referenced by computeDataLayout(), createARMMCAsmInfo(), llvm::createX86_64AsmBackend(), getARMCPUForArch(), InitLibcallNames(), llvm::ARMSubtarget::isTargetAEABI(), llvm::ARMSubtarget::isTargetAndroid(), llvm::ARMSubtarget::isTargetEHABICompatible(), llvm::ARMSubtarget::isTargetHardFloat(), isWindowsCygwinEnvironment(), isWindowsGNUEnvironment(), llvm::X86_MC::ParseX86Triple(), and llvm::X86ELFMCAsmInfo::X86ELFMCAsmInfo().
StringRef Triple::getEnvironmentName | ( | ) | const |
getEnvironmentName - Get the optional environment (fourth) component of the triple, or "" if empty.
Definition at line 609 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by setOSName().
const char * Triple::getEnvironmentTypeName | ( | EnvironmentType | Kind | ) | [static] |
getEnvironmentTypeName - Get the canonical name for the Kind
environment.
Definition at line 156 of file Triple.cpp.
References Android, CODE16, Cygnus, EABI, EABIHF, GNU, GNUEABI, GNUEABIHF, GNUX32, Itanium, llvm_unreachable, MSVC, and UnknownEnvironment.
Referenced by setEnvironment(), and setObjectFormat().
void Triple::getiOSVersion | ( | unsigned & | Major, |
unsigned & | Minor, | ||
unsigned & | Micro | ||
) | const |
getiOSVersion - Parse the version number as with getOSVersion. This should only be called with IOS triples.
Definition at line 701 of file Triple.cpp.
References aarch64, Darwin, getArch(), getOS(), getOSVersion(), IOS, llvm_unreachable, and MacOSX.
bool Triple::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. 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 662 of file Triple.cpp.
References Darwin, getOS(), getOSVersion(), IOS, llvm_unreachable, and MacOSX.
ObjectFormatType llvm::Triple::getObjectFormat | ( | ) | const [inline] |
getFormat - Get the object format for this triple.
Definition at line 230 of file Triple.h.
Referenced by llvm::createARMAsmBackend(), createMCStreamer(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), llvm::ARMTargetLowering::LowerOperation(), and llvm::ARMTargetLowering::useLoadStackGuardNode().
OSType llvm::Triple::getOS | ( | ) | const [inline] |
getOS - Get the parsed operating system type of this triple.
Definition at line 218 of file Triple.h.
Referenced by llvm::ARMELFMCAsmInfo::ARMELFMCAsmInfo(), llvm::ARMTargetLowering::ARMTargetLowering(), llvm::createAArch64beAsmBackend(), llvm::createAArch64leAsmBackend(), createARMMCAsmInfo(), CreatePrologue(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), getARMCPUForArch(), getDataLayoutString(), getiOSVersion(), getMacOSXVersion(), getOSVersion(), llvm::ARMSubtarget::hasSinCos(), hasSinCosPiStret(), initialize(), InitLibcallNames(), isiOS(), llvm::ARMSubtarget::isTargetNetBSD(), isWindowsCygwinEnvironment(), isWindowsGNUEnvironment(), llvm::NVPTXSubtarget::NVPTXSubtarget(), llvm::PPCELFMCAsmInfo::PPCELFMCAsmInfo(), llvm::SparcELFMCAsmInfo::SparcELFMCAsmInfo(), and llvm::X86ELFMCAsmInfo::X86ELFMCAsmInfo().
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 615 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by setArchName(), and setVendorName().
unsigned llvm::Triple::getOSMajorVersion | ( | ) | const [inline] |
StringRef Triple::getOSName | ( | ) | const |
getOSName - Get the operating system (third) component of the triple.
Definition at line 603 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by getOSVersion(), and setEnvironmentName().
const char * Triple::getOSTypeName | ( | OSType | Kind | ) | [static] |
getOSTypeName - Get the canonical name for the Kind
operating system.
Definition at line 126 of file Triple.cpp.
References AIX, Bitrig, CNK, CUDA, Darwin, DragonFly, FreeBSD, Haiku, IOS, KFreeBSD, Linux, llvm_unreachable, Lv2, MacOSX, Minix, NaCl, NetBSD, NVCL, OpenBSD, RTEMS, Solaris, UnknownOS, and Win32.
Referenced by getOSVersion(), and setOS().
void Triple::getOSVersion | ( | unsigned & | Major, |
unsigned & | Minor, | ||
unsigned & | Micro | ||
) | const |
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 635 of file Triple.cpp.
References EatNumber(), llvm::StringRef::empty(), getOS(), getOSName(), getOSTypeName(), llvm::StringRef::size(), llvm::StringRef::startswith(), and llvm::StringRef::substr().
Referenced by getiOSVersion(), and getMacOSXVersion().
SubArchType llvm::Triple::getSubArch | ( | ) | const [inline] |
getSubArch - get the parsed subarchitecture type for this triple.
Definition at line 212 of file Triple.h.
Referenced by llvm::ARM_MC::ParseARMTriple().
const std::string& llvm::Triple::getTriple | ( | ) | const [inline] |
Definition at line 264 of file Triple.h.
Referenced by llvm::TargetRegistry::lookupTarget(), and llvm::EngineBuilder::selectTarget().
VendorType llvm::Triple::getVendor | ( | ) | const [inline] |
getVendor - Get the parsed vendor type of this triple.
Definition at line 215 of file Triple.h.
Referenced by llvm::SubtargetFeatures::getDefaultSubtargetFeatures(), and llvm::PPCSubtarget::isBGQ().
StringRef Triple::getVendorName | ( | ) | const |
getVendorName - Get the vendor (second) component of the triple.
Definition at line 598 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by setArchName(), setEnvironmentName(), setOSAndEnvironmentName(), and setOSName().
const char * Triple::getVendorTypeName | ( | VendorType | Kind | ) | [static] |
getVendorTypeName - Get the canonical name for the Kind
vendor.
Definition at line 106 of file Triple.cpp.
References Apple, BGP, BGQ, CSR, Freescale, IBM, ImaginationTechnologies, llvm_unreachable, MipsTechnologies, NVIDIA, PC, SCEI, and UnknownVendor.
Referenced by setVendor().
bool llvm::Triple::hasEnvironment | ( | ) | const [inline] |
hasEnvironment - Does this triple have the optional environment (fourth) component?
Definition at line 222 of file Triple.h.
Referenced by setOSName().
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 837 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 833 of file Triple.cpp.
References getArch(), and getArchPointerBitWidth().
Referenced by 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 829 of file Triple.cpp.
References getArch(), and getArchPointerBitWidth().
Referenced by computeDataLayout(), and llvm::sys::getProcessTriple().
bool llvm::Triple::isiOS | ( | ) | const [inline] |
Is this an iOS triple.
Definition at line 347 of file Triple.h.
References Darwin, getOS(), and MacOSX.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), initialize(), llvm::AArch64Subtarget::isTargetIOS(), llvm::ARMSubtarget::isTargetIOS(), isWindowsMSVCEnvironment(), llvm::EngineBuilder::selectTarget(), and useCompactUnwind().
bool llvm::Triple::isKnownWindowsMSVCEnvironment | ( | ) | const [inline] |
Definition at line 366 of file Triple.h.
Referenced by createTLOF().
bool llvm::Triple::isMacOSX | ( | ) | const [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 342 of file Triple.h.
Referenced by hasSinCosPiStret(), initialize(), llvm::PPCSubtarget::isDarwin(), isWindowsMSVCEnvironment(), llvm::PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(), PrepareCall(), useCompactUnwind(), and llvm::X86MCAsmInfoDarwin::X86MCAsmInfoDarwin().
unsigned llvm::Triple::isMacOSXVersionLT | ( | unsigned | Major, |
unsigned | Minor = 0 , |
||
unsigned | Micro = 0 |
||
) | const [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 327 of file Triple.h.
Referenced by hasSinCosPiStret(), initialize(), llvm::PPCMCAsmInfoDarwin::PPCMCAsmInfoDarwin(), PrepareCall(), useCompactUnwind(), and llvm::X86MCAsmInfoDarwin::X86MCAsmInfoDarwin().
bool llvm::Triple::isOSBinFormatCOFF | ( | ) | const [inline] |
Tests whether the OS uses the COFF binary format.
Definition at line 413 of file Triple.h.
Referenced by createTLOF(), llvm::DataLayout::getManglingComponent(), llvm::AArch64Subtarget::isTargetCOFF(), and llvm::ARMSubtarget::isTargetCOFF().
bool llvm::Triple::isOSBinFormatELF | ( | ) | const [inline] |
Tests whether the OS uses the ELF binary format.
Definition at line 408 of file Triple.h.
Referenced by llvm::createAArch64beAsmBackend(), llvm::createAArch64leAsmBackend(), createAArch64MCAsmInfo(), createAArch64MCCodeGenInfo(), llvm::createARMAsmBackend(), createTLOF(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), createX86MCAsmInfo(), createX86MCRelocationInfo(), llvm::SystemZSubtarget::isTargetELF(), llvm::AArch64Subtarget::isTargetELF(), llvm::PPCSubtarget::isTargetELF(), llvm::ARMSubtarget::isTargetELF(), and llvm::AArch64MCInstLower::LowerSymbolOperand().
bool llvm::Triple::isOSBinFormatMachO | ( | ) | const [inline] |
Tests whether the environment is MachO.
Definition at line 418 of file Triple.h.
Referenced by createAArch64MCCodeGenInfo(), createARMMCAsmInfo(), createARMMCRelocationInfo(), createTLOF(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), createX86MCAsmInfo(), createX86MCRelocationInfo(), llvm::DataLayout::getManglingComponent(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), llvm::AArch64Subtarget::isTargetMachO(), llvm::PPCSubtarget::isTargetMachO(), and llvm::ARMSubtarget::isTargetMachO().
bool llvm::Triple::isOSCygMing | ( | ) | const [inline] |
Tests for either Cygwin or MinGW OS.
Definition at line 383 of file Triple.h.
Referenced by createX86MCAsmInfo(), llvm::X86_MC::getDwarfRegFlavour(), and initialize().
bool llvm::Triple::isOSDarwin | ( | ) | const [inline] |
isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
Definition at line 352 of file Triple.h.
Referenced by computeDataLayout(), llvm::createAArch64leAsmBackend(), createAArch64MCAsmInfo(), createAArch64MCCodeGenInfo(), createARMMCCodeGenInfo(), createMCStreamer(), createPPCMCAsmInfo(), createPPCMCCodeGenInfo(), createTLOF(), createX86MCCodeGenInfo(), getDataLayoutString(), getDefaultFormat(), llvm::X86_MC::getDwarfRegFlavour(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), llvm::AArch64Subtarget::isTargetDarwin(), llvm::ARMSubtarget::isTargetDarwin(), llvm::AArch64MCInstLower::LowerSymbolOperand(), and useCompactUnwind().
bool llvm::Triple::isOSFreeBSD | ( | ) | const [inline] |
bool llvm::Triple::isOSLinux | ( | ) | const [inline] |
Tests whether the OS is Linux.
Definition at line 403 of file Triple.h.
Referenced by createTLOF(), initialize(), llvm::AArch64Subtarget::isTargetLinux(), and llvm::ARMSubtarget::isTargetLinux().
bool llvm::Triple::isOSMSVCRT | ( | ) | const [inline] |
bool llvm::Triple::isOSNaCl | ( | ) | const [inline] |
Tests whether the OS is NaCl (Native Client)
Definition at line 398 of file Triple.h.
Referenced by computeDataLayout(), llvm::MipsSubtarget::isTargetNaCl(), llvm::ARMSubtarget::isTargetNaCl(), and llvm::ARM_MC::ParseARMTriple().
bool llvm::Triple::isOSVersionLT | ( | unsigned | Major, |
unsigned | Minor = 0 , |
||
unsigned | Micro = 0 |
||
) | const [inline] |
isOSVersionLT - Helper function for doing comparisons against version numbers included in the target triple.
Definition at line 309 of file Triple.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::ARMSubtarget::hasSinCos(), hasSinCosPiStret(), and initialize().
bool llvm::Triple::isOSWindows | ( | ) | const [inline] |
Tests whether the OS is Windows.
Definition at line 393 of file Triple.h.
Referenced by computeDataLayout(), llvm::createARMAsmBackend(), createMCStreamer(), createTLOF(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), createX86MCCodeGenInfo(), getDefaultFormat(), llvm::DataLayout::getManglingComponent(), initialize(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), llvm::AArch64Subtarget::isTargetWindows(), llvm::ARMSubtarget::isTargetWindows(), and llvm::X86MCAsmInfoGNUCOFF::X86MCAsmInfoGNUCOFF().
bool llvm::Triple::isWindowsCygwinEnvironment | ( | ) | const [inline] |
bool llvm::Triple::isWindowsGNUEnvironment | ( | ) | const [inline] |
bool llvm::Triple::isWindowsItaniumEnvironment | ( | ) | const [inline] |
Definition at line 370 of file Triple.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), createX86MCAsmInfo(), and llvm::ARMTargetLowering::LowerOperation().
bool llvm::Triple::isWindowsMSVCEnvironment | ( | ) | const [inline] |
Definition at line 360 of file Triple.h.
References isiOS(), and isMacOSX().
Referenced by createX86MCAsmInfo().
std::string Triple::normalize | ( | StringRef | Str | ) | [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 419 of file Triple.cpp.
References llvm::array_lengthof(), COFF, llvm::StringRef::empty(), getObjectFormatTypeName(), 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(), std::swap(), UnknownArch, UnknownEnvironment, UnknownObjectFormat, UnknownOS, UnknownVendor, and Win32.
Referenced by llvm::sys::getProcessTriple().
void Triple::setArch | ( | ArchType | Kind | ) |
setArch - Set the architecture (first) component of the triple to a known type.
Definition at line 728 of file Triple.cpp.
References getArchTypeName(), and setArchName().
Referenced by get32BitArchVariant(), get64BitArchVariant(), 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 752 of file Triple.cpp.
References getOSAndEnvironmentName(), getVendorName(), setTriple(), llvm::SmallString< InternalLen >::str(), 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 740 of file Triple.cpp.
References getEnvironmentTypeName(), and setEnvironmentName().
void Triple::setEnvironmentName | ( | StringRef | Str | ) |
setEnvironmentName - Set the optional environment (fourth) component of the triple by name.
Definition at line 775 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 744 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 736 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 780 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 767 of file Triple.cpp.
References getArchName(), getEnvironmentName(), getVendorName(), hasEnvironment(), and setTriple().
Referenced by setOS().
void Triple::setTriple | ( | const Twine & | Str | ) |
setTriple - Set all components to the new triple Str
.
Definition at line 724 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 732 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 763 of file Triple.cpp.
References getArchName(), getOSAndEnvironmentName(), and setTriple().
Referenced by setVendor().
const std::string& llvm::Triple::str | ( | ) | const [inline] |
Definition at line 262 of file Triple.h.
Referenced by llvm::sys::getProcessTriple(), and setObjectFormat().