LLVM API Documentation
#include <Triple.h>
Public Types | |
enum | ArchType { UnknownArch, arm, aarch64, hexagon, mips, mipsel, mips64, mips64el, msp430, ppc, ppc64, ppc64le, r600, sparc, sparcv9, systemz, tce, thumb, x86, x86_64, xcore, nvptx, nvptx64, le32, amdil, spir, spir64 } |
enum | VendorType { UnknownVendor, Apple, PC, SCEI, BGP, BGQ, Freescale, IBM, NVIDIA } |
enum | OSType { UnknownOS, AuroraUX, Cygwin, Darwin, DragonFly, FreeBSD, IOS, KFreeBSD, Linux, Lv2, MacOSX, MinGW32, NetBSD, OpenBSD, Solaris, Win32, Haiku, Minix, RTEMS, NaCl, CNK, Bitrig, AIX, CUDA, NVCL } |
enum | EnvironmentType { UnknownEnvironment, GNU, GNUEABI, GNUEABIHF, GNUX32, EABI, MachO, Android, ELF } |
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... | |
Typed Component Access | |
ArchType | getArch () const |
getArch - Get the parsed architecture type of 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 |
EnvironmentType | getEnvironment () const |
getEnvironment - Get the parsed environment type of this triple. More... | |
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 |
Direct Component Access | |
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. More... | |
StringRef | getOSName () const |
StringRef | getEnvironmentName () const |
StringRef | getOSAndEnvironmentName () const |
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 |
unsigned | isMacOSXVersionLT (unsigned Major, unsigned Minor=0, unsigned Micro=0) const |
bool | isMacOSX () const |
bool | isiOS () const |
Is this an iOS triple. More... | |
bool | isOSDarwin () const |
isOSDarwin - Is this a "Darwin" OS (OS X or iOS). More... | |
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 | 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 | isEnvironmentMachO () const |
Tests whether the environment is MachO. More... | |
Mutators | |
void | setArch (ArchType Kind) |
void | setVendor (VendorType Kind) |
void | setOS (OSType Kind) |
void | setEnvironment (EnvironmentType Kind) |
void | setTriple (const Twine &Str) |
setTriple - Set all components to the new triple Str . More... | |
void | setArchName (StringRef Str) |
void | setVendorName (StringRef Str) |
void | setOSName (StringRef Str) |
void | setEnvironmentName (StringRef Str) |
void | setOSAndEnvironmentName (StringRef Str) |
const char * | getArchNameForAssembler () |
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... | |
Static Public Member Functions | |
Normalization | |
static std::string | normalize (StringRef Str) |
Static helpers for IDs. | |
static const char * | getArchTypeName (ArchType Kind) |
getArchTypeName - Get the canonical name for the Kind architecture. More... | |
static const char * | getArchTypePrefix (ArchType Kind) |
static const char * | getVendorTypeName (VendorType Kind) |
getVendorTypeName - Get the canonical name for the Kind vendor. More... | |
static const char * | getOSTypeName (OSType Kind) |
getOSTypeName - Get the canonical name for the Kind operating system. More... | |
static const char * | getEnvironmentTypeName (EnvironmentType Kind) |
Static helpers for converting alternate architecture names. | |
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 |
|
inline |
Default constructor is the same as an empty string and leaves all triple fields unknown.
Definition at line 150 of file Triple.h.
Referenced by setArchName(), and setTriple().
|
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 315 of file Triple.cpp.
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 329 of file Triple.cpp.
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 342 of file Triple.cpp.
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 720 of file Triple.cpp.
References aarch64, amdil, arm, getArch(), hexagon, le32, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, setArch(), sparc, sparcv9, spir, spir64, systemz, T, tce, thumb, 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 760 of file Triple.cpp.
References aarch64, amdil, arm, getArch(), hexagon, le32, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, setArch(), sparc, sparcv9, spir, spir64, systemz, T, tce, thumb, UnknownArch, x86, x86_64, and xcore.
Referenced by llvm::sys::getProcessTriple().
|
inline |
getArch - Get the parsed architecture type of this triple.
Definition at line 172 of file Triple.h.
Referenced by createMCStreamer(), createPPCMCAsmInfo(), createPPCMCCodeGenInfo(), createPPCMCRegisterInfo(), createX86MCAsmInfo(), createX86MCCodeGenInfo(), createX86MCRegisterInfo(), createX86MCRelocationInfo(), EmitDarwinBCHeaderAndTrailer(), get32BitArchVariant(), get64BitArchVariant(), llvm::SubtargetFeatures::getDefaultSubtargetFeatures(), llvm::X86_MC::getDwarfRegFlavour(), hasSinCosPiStret(), initialize(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), isArch16Bit(), isArch32Bit(), isArch64Bit(), llvm::MipsMCAsmInfo::MipsMCAsmInfo(), llvm::NVPTXMCAsmInfo::NVPTXMCAsmInfo(), llvm::X86_MC::ParseX86Triple(), llvm::EngineBuilder::selectTarget(), llvm::SparcELFMCAsmInfo::SparcELFMCAsmInfo(), 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 486 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by llvm::createARMAsmBackend(), llvm::createX86_64AsmBackend(), getArchNameForAssembler(), setEnvironmentName(), setOSAndEnvironmentName(), setOSName(), and setVendorName().
const char * Triple::getArchNameForAssembler | ( | ) |
getArchNameForAssembler - Get an architecture name that is understood by the target assembler.
Definition at line 194 of file Triple.cpp.
References Apple, llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), llvm::StringSwitch< T, R >::Default(), getArchName(), getVendor(), and isOSDarwin().
|
static |
getArchTypeForLLVMName - The canonical type for the given LLVM architecture name (e.g., "x86").
Definition at line 161 of file Triple.cpp.
References aarch64, amdil, arm, llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Default(), hexagon, le32, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, sparc, sparcv9, spir, spir64, systemz, tce, thumb, UnknownArch, x86, x86_64, and xcore.
Referenced by llvm::TargetRegistry::lookupTarget(), and llvm::EngineBuilder::selectTarget().
|
static |
getArchTypeName - Get the canonical name for the Kind
architecture.
Definition at line 18 of file Triple.cpp.
References aarch64, amdil, arm, hexagon, le32, llvm_unreachable, mips, mips64, mips64el, mipsel, msp430, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, sparc, sparcv9, spir, spir64, systemz, tce, thumb, UnknownArch, x86, x86_64, and xcore.
Referenced by llvm::object::MachOUniversalBinary::ObjectForArch::getAsObjectFile(), and setArch().
|
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 53 of file Triple.cpp.
References aarch64, amdil, arm, hexagon, le32, mips, mips64, mips64el, mipsel, nvptx, nvptx64, ppc, ppc64, ppc64le, r600, sparc, sparcv9, spir, spir64, systemz, thumb, x86, x86_64, and xcore.
|
inline |
getEnvironment - Get the parsed environment type of this triple.
Definition at line 187 of file Triple.h.
Referenced by createMCStreamer(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), createX86MCAsmInfo(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), isEnvironmentMachO(), llvm::X86Subtarget::isTarget64BitILP32(), llvm::X86Subtarget::isTarget64BitLP64(), llvm::ARMSubtarget::isTargetAEABI(), llvm::X86Subtarget::isTargetCOFF(), llvm::X86Subtarget::isTargetELF(), and llvm::X86ELFMCAsmInfo::X86ELFMCAsmInfo().
StringRef Triple::getEnvironmentName | ( | ) | const |
getEnvironmentName - Get the optional environment (fourth) component of the triple, or "" if empty.
Definition at line 501 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by hasEnvironment(), and setOSName().
|
static |
getEnvironmentTypeName - Get the canonical name for the Kind
environment.
Definition at line 145 of file Triple.cpp.
References Android, EABI, ELF, GNU, GNUEABI, GNUEABIHF, GNUX32, llvm_unreachable, MachO, and UnknownEnvironment.
Referenced by setEnvironment().
getiOSVersion - Parse the version number as with getOSVersion. This should only be called with IOS triples.
Definition at line 593 of file Triple.cpp.
References Darwin, getOS(), getOSVersion(), IOS, llvm_unreachable, and MacOSX.
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 554 of file Triple.cpp.
References Darwin, getOS(), getOSVersion(), IOS, llvm_unreachable, and MacOSX.
|
inline |
getOS - Get the parsed operating system type of this triple.
Definition at line 178 of file Triple.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::createAArch64AsmBackend(), CreatePrologue(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), createX86MCAsmInfo(), llvm::PPCSubtarget::getDataLayoutString(), llvm::X86_MC::getDwarfRegFlavour(), getiOSVersion(), getMacOSXVersion(), getOSVersion(), llvm::ARMSubtarget::hasSinCos(), hasSinCosPiStret(), initialize(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), isiOS(), isMacOSX(), isMacOSXVersionLT(), isOSCygMing(), isOSLinux(), isOSMSVCRT(), isOSNaCl(), isOSWindows(), llvm::X86Subtarget::isTargetCygwin(), llvm::X86Subtarget::isTargetFreeBSD(), llvm::X86Subtarget::isTargetMingw(), llvm::X86Subtarget::isTargetSolaris(), llvm::X86Subtarget::isTargetWindows(), llvm::NVPTXSubtarget::NVPTXSubtarget(), 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 507 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 199 of file Triple.h.
References getOSVersion().
StringRef Triple::getOSName | ( | ) | const |
getOSName - Get the operating system (third) component of the triple.
Definition at line 495 of file Triple.cpp.
References llvm::StringRef::split().
Referenced by getOSVersion(), and setEnvironmentName().
|
static |
getOSTypeName - Get the canonical name for the Kind
operating system.
Definition at line 112 of file Triple.cpp.
References AIX, AuroraUX, Bitrig, CNK, CUDA, Cygwin, Darwin, DragonFly, FreeBSD, Haiku, IOS, KFreeBSD, Linux, llvm_unreachable, Lv2, MacOSX, MinGW32, Minix, NaCl, NetBSD, NVCL, OpenBSD, RTEMS, Solaris, UnknownOS, 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 527 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(), getMacOSXVersion(), getOSMajorVersion(), and isOSVersionLT().
|
inline |
Definition at line 223 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 175 of file Triple.h.
Referenced by getArchNameForAssembler(), llvm::SubtargetFeatures::getDefaultSubtargetFeatures(), llvm::PPCSubtarget::isBGP(), and llvm::PPCSubtarget::isBGQ().
StringRef Triple::getVendorName | ( | ) | const |
getVendorName - Get the vendor (second) component of the triple.
Definition at line 490 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 95 of file Triple.cpp.
References Apple, BGP, BGQ, Freescale, IBM, llvm_unreachable, NVIDIA, PC, SCEI, and UnknownVendor.
Referenced by setVendor().
|
inline |
hasEnvironment - Does this triple have the optional environment (fourth) component?
Definition at line 182 of file Triple.h.
References getEnvironmentName().
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 716 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 712 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 708 of file Triple.cpp.
References getArch(), and getArchPointerBitWidth().
Referenced by llvm::sys::getProcessTriple().
|
inline |
Tests whether the environment is MachO.
Definition at line 354 of file Triple.h.
References getEnvironment(), isOSDarwin(), and MachO.
Referenced by createARMMCRelocationInfo(), createX86MCRelocationInfo(), and llvm::X86Subtarget::isTargetEnvMacho().
|
inline |
Is this an iOS triple.
Definition at line 308 of file Triple.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), initialize(), isOSDarwin(), llvm::ARMSubtarget::isTargetIOS(), and llvm::EngineBuilder::selectTarget().
|
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 303 of file Triple.h.
References Darwin, getOS(), and MacOSX.
Referenced by llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), llvm::X86Subtarget::hasSinCos(), hasSinCosPiStret(), initialize(), llvm::PPCSubtarget::isDarwin(), isMacOSXVersionLT(), isOSDarwin(), and PrepareCall().
|
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 288 of file Triple.h.
References getOS(), isMacOSX(), isOSVersionLT(), and MacOSX.
Referenced by llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), llvm::X86Subtarget::hasSinCos(), hasSinCosPiStret(), initialize(), and PrepareCall().
|
inline |
Tests whether the OS uses the COFF binary format.
Definition at line 348 of file Triple.h.
References isOSWindows().
Referenced by llvm::createARMAsmBackend(), and llvm::X86Subtarget::isTargetCOFF().
|
inline |
Tests whether the OS uses the ELF binary format.
Definition at line 343 of file Triple.h.
References isOSDarwin(), and isOSWindows().
Referenced by createX86MCRelocationInfo(), llvm::AArch64Subtarget::isTargetELF(), llvm::SystemZSubtarget::isTargetELF(), and llvm::X86Subtarget::isTargetELF().
|
inline |
Tests for either Cygwin or MinGW OS.
Definition at line 318 of file Triple.h.
References Cygwin, getOS(), and MinGW32.
Referenced by isOSWindows(), and llvm::X86Subtarget::isTargetCygMing().
|
inline |
isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
Definition at line 313 of file Triple.h.
References isiOS(), and isMacOSX().
Referenced by llvm::createARMAsmBackend(), createARMMCAsmInfo(), createARMMCCodeGenInfo(), createMCStreamer(), createPPCMCAsmInfo(), createPPCMCCodeGenInfo(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), createX86MCAsmInfo(), createX86MCCodeGenInfo(), getArchNameForAssembler(), llvm::X86_MC::getDwarfRegFlavour(), llvm::MCObjectFileInfo::InitMCObjectFileInfo(), isEnvironmentMachO(), isOSBinFormatELF(), llvm::ARMSubtarget::isTargetDarwin(), and llvm::X86Subtarget::isTargetDarwin().
|
inline |
Tests whether the OS is Linux.
Definition at line 338 of file Triple.h.
References getOS(), and Linux.
Referenced by initialize(), llvm::AArch64Subtarget::isTargetLinux(), llvm::ARMSubtarget::isTargetLinux(), and llvm::X86Subtarget::isTargetLinux().
|
inline |
|
inline |
Tests whether the OS is NaCl (Native Client)
Definition at line 333 of file Triple.h.
Referenced by llvm::ARMSubtarget::isTargetNaCl(), llvm::X86Subtarget::isTargetNaCl(), and llvm::ARM_MC::ParseARMTriple().
|
inline |
isOSVersionLT - Helper function for doing comparisons against version numbers included in the target triple.
Definition at line 270 of file Triple.h.
References getOSVersion().
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::ARMSubtarget::hasSinCos(), hasSinCosPiStret(), initialize(), and isMacOSXVersionLT().
|
inline |
Tests whether the OS is Windows.
Definition at line 328 of file Triple.h.
References getOS(), isOSCygMing(), and Win32.
Referenced by createMCStreamer(), llvm::createX86_32AsmBackend(), llvm::createX86_64AsmBackend(), createX86MCCodeGenInfo(), isOSBinFormatCOFF(), isOSBinFormatELF(), llvm::X86Subtarget::isOSWindows(), and llvm::X86Subtarget::isTargetWin64().
|
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 352 of file Triple.cpp.
References llvm::array_lengthof(), llvm::StringRef::empty(), llvm_unreachable, parseArch(), parseEnvironment(), parseOS(), parseVendor(), llvm::SmallVectorTemplateBase< T, isPodLike< T >::value >::push_back(), llvm::SmallVectorTemplateCommon< T >::size(), llvm::StringRef::split(), std::swap(), UnknownArch, UnknownEnvironment, UnknownOS, and UnknownVendor.
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 620 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 636 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 632 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 659 of file Triple.cpp.
References getArchName(), getOSName(), getVendorName(), and setTriple().
Referenced by setEnvironment().
void Triple::setOS | ( | OSType | Kind | ) |
setOS - Set the operating system (third) component of the triple to a known type.
Definition at line 628 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 664 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 651 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 616 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 624 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 647 of file Triple.cpp.
References getArchName(), getOSAndEnvironmentName(), and setTriple().
Referenced by setVendor().
|
inline |
Definition at line 221 of file Triple.h.
Referenced by llvm::sys::getProcessTriple().