10 #ifndef LLVM_ADT_TRIPLE_H
11 #define LLVM_ADT_TRIPLE_H
150 Triple() : Data(), Arch(), Vendor(), OS(), Environment() {}
155 const Twine &EnvironmentStr);
195 void getOSVersion(
unsigned &Major,
unsigned &Minor,
unsigned &Micro)
const;
200 unsigned Maj, Min, Micro;
210 unsigned &Micro)
const;
215 unsigned &Micro)
const;
221 const std::string &
str()
const {
return Data; }
271 unsigned Micro = 0)
const {
276 return LHS[0] < Major;
278 return LHS[1] < Minor;
280 return LHS[1] < Micro;
289 unsigned Micro = 0)
const {
290 assert(
isMacOSX() &&
"Not an OS X triple!");
297 assert(Major == 10 &&
"Unexpected major version");
OSType getOS() const
getOS - Get the parsed operating system type of this triple.
static std::string normalize(StringRef Str)
unsigned getOSMajorVersion() const
void setVendor(VendorType Kind)
const std::string & str() const
void setEnvironment(EnvironmentType Kind)
bool isOSWindows() const
Tests whether the OS is Windows.
bool isOSCygMing() const
Tests for either Cygwin or MinGW OS.
void setVendorName(StringRef Str)
Triple()
Default constructor is the same as an empty string and leaves all triple fields unknown.
bool isArch64Bit() const
Test whether the architecture is 64-bit.
unsigned isMacOSXVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
bool isOSLinux() const
Tests whether the OS is Linux.
bool isEnvironmentMachO() const
Tests whether the environment is MachO.
bool isOSNaCl() const
Tests whether the OS is NaCl (Native Client)
StringRef getOSAndEnvironmentName() const
ArchType getArch() const
getArch - Get the parsed architecture type of this triple.
llvm::Triple get32BitArchVariant() const
Form a triple with a 32-bit variant of the current architecture.
bool isiOS() const
Is this an iOS triple.
StringRef getEnvironmentName() const
void setEnvironmentName(StringRef Str)
const std::string & getTriple() const
static const char * getVendorTypeName(VendorType Kind)
getVendorTypeName - Get the canonical name for the Kind vendor.
void setTriple(const Twine &Str)
setTriple - Set all components to the new triple Str.
void setArchName(StringRef Str)
void getiOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
void setOSName(StringRef Str)
static const char * getArchTypePrefix(ArchType Kind)
bool isOSDarwin() const
isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
static const char * getEnvironmentTypeName(EnvironmentType Kind)
void getOSVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const
StringRef getOSName() const
static ArchType getArchTypeForLLVMName(StringRef Str)
static const char * getArchTypeName(ArchType Kind)
getArchTypeName - Get the canonical name for the Kind architecture.
bool isArch16Bit() const
Test whether the architecture is 16-bit.
bool isOSVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
const char * getArchNameForAssembler()
llvm::Triple get64BitArchVariant() const
Form a triple with a 64-bit variant of the current architecture.
void setOSAndEnvironmentName(StringRef Str)
StringRef getArchName() const
bool isOSMSVCRT() const
Is this a "Windows" OS targeting a "MSVCRT.dll" environment.
bool getMacOSXVersion(unsigned &Major, unsigned &Minor, unsigned &Micro) const
bool hasEnvironment() const
EnvironmentType getEnvironment() const
getEnvironment - Get the parsed environment type of this triple.
VendorType getVendor() const
getVendor - Get the parsed vendor type of this triple.
static const char * getOSTypeName(OSType Kind)
getOSTypeName - Get the canonical name for the Kind operating system.
bool isArch32Bit() const
Test whether the architecture is 32-bit.
StringRef getVendorName() const
getVendorName - Get the vendor (second) component of the triple.
void setArch(ArchType Kind)