27 return Arch ==
Other.Arch && SubArch ==
Other.SubArch &&
29 Environment ==
Other.Environment && ObjectFormat ==
Other.ObjectFormat;
33 return std::tie(Arch, SubArch, Vendor, OS, Environment, ObjectFormat, Data) <
104 return "powerpc64le";
112 return "renderscript32";
114 return "renderscript64";
176 return "mipsisa32r6";
180 return "mipsisa32r6el";
184 return "mipsisa64r6";
188 return "mipsisa64r6el";
196 return "aarch64_lfi";
257 "amdgpu6",
"amdgpu6.00",
"amdgpu6.01",
"amdgpu6.02",
259 "amdgpu7",
"amdgpu7.00",
"amdgpu7.01",
"amdgpu7.02",
260 "amdgpu7.03",
"amdgpu7.04",
"amdgpu7.05",
262 "amdgpu8",
"amdgpu8.01",
"amdgpu8.02",
"amdgpu8.03",
267 "amdgpu9",
"amdgpu9.00",
"amdgpu9.02",
"amdgpu9.04",
268 "amdgpu9.06",
"amdgpu9.09",
"amdgpu9.0c",
270 "amdgpu9.08",
"amdgpu9.0a",
272 "amdgpu9.4",
"amdgpu9.42",
"amdgpu9.50",
274 "amdgpu10.1",
"amdgpu10.10",
"amdgpu10.11",
"amdgpu10.12",
277 "amdgpu10.3",
"amdgpu10.30",
"amdgpu10.31",
"amdgpu10.32",
278 "amdgpu10.33",
"amdgpu10.34",
"amdgpu10.35",
"amdgpu10.36",
280 "amdgpu11",
"amdgpu11.00",
"amdgpu11.01",
"amdgpu11.02",
281 "amdgpu11.03",
"amdgpu11.50",
"amdgpu11.51",
"amdgpu11.52",
282 "amdgpu11.53",
"amdgpu11.54",
284 "amdgpu11.7",
"amdgpu11.70",
"amdgpu11.71",
"amdgpu11.72",
286 "amdgpu12",
"amdgpu12.00",
"amdgpu12.01",
288 "amdgpu12.5",
"amdgpu12.50",
"amdgpu12.51",
290 "amdgpu13",
"amdgpu13.10"};
425#define TRIPLE_VENDOR(Enum, Name) \
428#include "llvm/TargetParser/TripleName.def"
438#define TRIPLE_OS(Enum, Name) \
441#include "llvm/TargetParser/TripleName.def"
451#define TRIPLE_ENV(Enum, Name) \
454#include "llvm/TargetParser/TripleName.def"
477 return "dxcontainer";
485 if (ArchName ==
"bpf") {
490 }
else if (ArchName ==
"bpf_be" || ArchName ==
"bpfeb") {
492 }
else if (ArchName ==
"bpf_le" || ArchName ==
"bpfel") {
617 if (ArchName.
empty())
644 .Cases({
"amd64",
"x86_64",
"x86_64h",
"x86_64_lfi"},
Triple::x86_64)
645 .Cases({
"powerpc",
"powerpcspe",
"ppc",
"ppc32"},
Triple::ppc)
667 .
Cases({
"mips",
"mipseb",
"mipsallegrex",
"mipsisa32r6",
"mipsr6"},
669 .Cases({
"mipsel",
"mipsallegrexel",
"mipsisa32r6el",
"mipsr6el"},
671 .Cases({
"mips64",
"mips64eb",
"mipsn32",
"mipsisa64r6",
"mips64r6",
674 .Cases({
"mips64el",
"mipsn32el",
"mipsisa64r6el",
"mips64r6el",
702 .Cases({
"spirv32",
"spirv32v1.0",
"spirv32v1.1",
"spirv32v1.2",
703 "spirv32v1.3",
"spirv32v1.4",
"spirv32v1.5",
"spirv32v1.6"},
705 .Cases({
"spirv64",
"spirv64v1.0",
"spirv64v1.1",
"spirv64v1.2",
706 "spirv64v1.3",
"spirv64v1.4",
"spirv64v1.5",
"spirv64v1.6"},
719 .
Cases({
"dxil",
"dxilv1.0",
"dxilv1.1",
"dxilv1.2",
"dxilv1.3",
720 "dxilv1.4",
"dxilv1.5",
"dxilv1.6",
"dxilv1.7",
"dxilv1.8",
741#define TRIPLE_VENDOR(Enum, Name) .Case(Name, Triple::Enum)
742#define TRIPLE_VENDOR_ALIAS(Enum, AliasName) .Case(AliasName, Triple::Enum)
743#include "llvm/TargetParser/TripleName.def"
749#define TRIPLE_OS(Enum, Name) .StartsWith(Name, Triple::Enum)
750#define TRIPLE_OS_ALIAS(Enum, AliasName) .StartsWith(AliasName, Triple::Enum)
751#include "llvm/TargetParser/TripleName.def"
757#define TRIPLE_ENV(Enum, Name) .StartsWith(Name, Triple::Enum)
758#include "llvm/TargetParser/TripleName.def"
781 if (SubArchName ==
"powerpcspe")
784 if (SubArchName ==
"arm64e")
787 if (SubArchName ==
"arm64ec")
790 if (SubArchName ==
"aarch64_lfi")
793 if (SubArchName ==
"x86_64_lfi")
895 if (ARMSubArch.
empty())
904 case ARM::ArchKind::ARMV4:
906 case ARM::ArchKind::ARMV4T:
908 case ARM::ArchKind::ARMV5T:
910 case ARM::ArchKind::ARMV5TE:
911 case ARM::ArchKind::IWMMXT:
912 case ARM::ArchKind::IWMMXT2:
913 case ARM::ArchKind::XSCALE:
914 case ARM::ArchKind::ARMV5TEJ:
916 case ARM::ArchKind::ARMV6:
918 case ARM::ArchKind::ARMV6K:
919 case ARM::ArchKind::ARMV6KZ:
921 case ARM::ArchKind::ARMV6T2:
923 case ARM::ArchKind::ARMV6M:
925 case ARM::ArchKind::ARMV7A:
926 case ARM::ArchKind::ARMV7R:
928 case ARM::ArchKind::ARMV7VE:
930 case ARM::ArchKind::ARMV7K:
932 case ARM::ArchKind::ARMV7M:
934 case ARM::ArchKind::ARMV7S:
936 case ARM::ArchKind::ARMV7EM:
938 case ARM::ArchKind::ARMV8A:
940 case ARM::ArchKind::ARMV8_1A:
942 case ARM::ArchKind::ARMV8_2A:
944 case ARM::ArchKind::ARMV8_3A:
946 case ARM::ArchKind::ARMV8_4A:
948 case ARM::ArchKind::ARMV8_5A:
950 case ARM::ArchKind::ARMV8_6A:
952 case ARM::ArchKind::ARMV8_7A:
954 case ARM::ArchKind::ARMV8_8A:
956 case ARM::ArchKind::ARMV8_9A:
958 case ARM::ArchKind::ARMV9A:
960 case ARM::ArchKind::ARMV9_1A:
962 case ARM::ArchKind::ARMV9_2A:
964 case ARM::ArchKind::ARMV9_3A:
966 case ARM::ArchKind::ARMV9_4A:
968 case ARM::ArchKind::ARMV9_5A:
970 case ARM::ArchKind::ARMV9_6A:
972 case ARM::ArchKind::ARMV9_7A:
974 case ARM::ArchKind::ARMV8R:
976 case ARM::ArchKind::ARMV8MBaseline:
978 case ARM::ArchKind::ARMV8MMainline:
980 case ARM::ArchKind::ARMV8_1MMainline:
988 switch (
T.getArch()) {
1052 if (
T.isOSWindows())
1092 if (Components.
size() > 0) {
1095 if (Components.
size() > 1) {
1097 if (Components.
size() > 2) {
1099 if (Components.
size() > 3) {
1128 : Data((ArchStr +
Twine(
'-') + VendorStr +
Twine(
'-') + OSStr).
str()),
1141 const Twine &EnvironmentStr)
1142 : Data((ArchStr +
Twine(
'-') + VendorStr +
Twine(
'-') + OSStr +
Twine(
'-') +
1157 Arch(
A), SubArch(SA), Vendor(V), OS(OS),
1166 Arch(
A), SubArch(SA), Vendor(V), OS(OS), Environment(E),
1176 Arch(
A), SubArch(SA), Vendor(V), OS(OS), Environment(E),
1186 const unsigned SMMajor = 6;
1189 if (std::optional<unsigned> SMMinor = Ver.
getMinor()) {
1219 if (ShaderModelStr ==
"shadermodel6.x") {
1229 bool IsMinGW32 =
false;
1230 bool IsCygwin =
false;
1234 Str.split(Components,
'-');
1242 if (Components.
size() > 0)
1245 if (Components.
size() > 1)
1248 if (Components.
size() > 2) {
1250 IsCygwin = Components[2].starts_with(
"cygwin") ||
1251 Components[2].starts_with(
"msys");
1252 IsMinGW32 = Components[2].starts_with(
"mingw");
1255 if (Components.
size() > 3)
1258 if (Components.
size() > 4)
1272 for (
unsigned Pos = 0; Pos != std::size(Found); ++Pos) {
1276 for (
unsigned Idx = 0; Idx != Components.
size(); ++Idx) {
1278 if (Idx < std::size(Found) && Found[Idx])
1299 Valid = OS !=
UnknownOS || IsCygwin || IsMinGW32;
1322 std::swap(CurrentComponent, Components[Idx]);
1325 for (
unsigned i = Pos; !CurrentComponent.
empty(); ++i) {
1327 while (i < std::size(Found) && Found[i])
1331 std::swap(CurrentComponent, Components[i]);
1333 }
else if (Pos > Idx) {
1340 for (
unsigned i = Idx; i < Components.
size();) {
1343 std::swap(CurrentComponent, Components[i]);
1345 if (CurrentComponent.
empty())
1348 while (++i < std::size(Found) && Found[i])
1352 if (!CurrentComponent.
empty())
1356 while (++Idx < std::size(Found) && Found[Idx])
1358 }
while (Idx < Pos);
1360 assert(Pos < Components.
size() && Components[Pos] == Comp &&
1361 "Component moved wrong!");
1369 if (Found[0] && !Found[1] && !Found[2] && Found[3] &&
1370 Components[1] ==
"none" && Components[2].
empty())
1371 std::swap(Components[1], Components[2]);
1380 std::string NormalizedEnvironment;
1383 StringRef AndroidVersion = Components[3].drop_front(strlen(
"androideabi"));
1384 if (AndroidVersion.
empty()) {
1385 Components[3] =
"android";
1387 NormalizedEnvironment =
Twine(
"android", AndroidVersion).
str();
1388 Components[3] = NormalizedEnvironment;
1394 Components[3] =
"gnueabihf";
1398 Components[2] =
"windows";
1401 Components[3] =
"msvc";
1405 }
else if (IsMinGW32) {
1407 Components[2] =
"windows";
1408 Components[3] =
"gnu";
1409 }
else if (IsCygwin) {
1411 Components[2] =
"windows";
1412 Components[3] =
"cygnus";
1414 if (IsMinGW32 || IsCygwin ||
1427 if (Components[0] ==
"dxil") {
1428 if (Components.
size() > 4) {
1438 if ((Components.
size() > 2) && (Components[2] ==
"firmware") &&
1439 (Components[1] !=
"apple"))
1441 "the firmware target os is only supported for the apple vendor");
1450 Components.
resize(
static_cast<unsigned>(Form),
"unknown");
1456 return join(Components,
"-");
1465 return Tmp.
split(
'-').first;
1470 Tmp = Tmp.
split(
'-').second;
1471 return Tmp.
split(
'-').first;
1476 Tmp = Tmp.
split(
'-').second;
1477 return Tmp.
split(
'-').second;
1482 return Tmp.
split(
'-').second;
1488 return Version.withoutBuild();
1500 if (EnvironmentName ==
"none")
1506 if (EnvironmentName.
contains(
"-")) {
1511 const std::string tmp = (
Twine(
"-") + ObjectFormatTypeName).
str();
1515 return EnvironmentName;
1546 if (
Version.getMajor() <= 19) {
1548 }
else if (
Version.getMajor() < 25) {
1551 }
else if ((
Version.getMajor() == 25) || (
Version.getMajor() == 26)) {
1561 if (
Version.getMajor() == 0) {
1563 }
else if (
Version.getMajor() < 10) {
1673 return Version.withMajorReplaced(19);
1695 if (ValidVersionMap.
contains(VulkanVersion) &&
1696 (ValidVersionMap.
lookup(VulkanVersion) == SpirvVersion ||
1698 return VulkanVersion;
1709 Arch.consume_front(
"dxilv");
2368 unsigned Micro)
const {
2378 assert(Major >= 11 &&
"Unexpected major version");
2423 bool IsInValidRange) {
2424 const unsigned MacOSRangeBump = 10;
2425 const unsigned IOSRangeBump = 7;
2426 const unsigned XROSRangeBump = 23;
2427 const unsigned WatchOSRangeBump = 14;
2436 if (!IsInValidRange)
2437 return Version.withMajorReplaced(
Version.getMajor() + MacOSRangeBump);
2445 if (!IsInValidRange)
2446 return Version.withMajorReplaced(
Version.getMajor() + IOSRangeBump);
2453 if (!IsInValidRange)
2454 return Version.withMajorReplaced(
Version.getMajor() + XROSRangeBump);
2461 if (!IsInValidRange)
2462 return Version.withMajorReplaced(
Version.getMajor() + WatchOSRangeBump);
2467 if (
Version.getMajor() == 26U)
2468 return Version.withMajorReplaced(27);
2481 auto IsValid = [&](
const VersionTuple &StartingVersion) {
2482 return !((
Version > StartingVersion) && (
Version < CommonVersion));
2487 return IsValid(StartingWatchOS);
2492 return IsValid(StartingIOS);
2496 return IsValid(StartingMacOS);
2500 return IsValid(StartingXROS);
2561 "incorrect HLSL stage order");
2563 "incorrect HLSL stage order");
2566 "incorrect HLSL stage order");
2568 "incorrect HLSL stage order");
2570 "incorrect HLSL stage order");
2572 "incorrect HLSL stage order");
2574 "incorrect HLSL stage order");
2576 "incorrect HLSL stage order");
2578 "incorrect HLSL stage order");
2581 "incorrect HLSL stage order");
2584 "incorrect HLSL stage order");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static const StringLiteral AMDGPUSubArchNames[Triple::LastAMDGPUSubArch - Triple::FirstAMDGPUSubArch+1]
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
This file defines the DenseMap class.
This file implements the StringSwitch template, which mimics a switch() statement whose cases are str...
static Triple::EnvironmentType parseEnvironment(StringRef EnvironmentName)
static VersionTuple parseVersionFromName(StringRef Name)
static Triple::ObjectFormatType getDefaultFormat(const Triple &T)
static Triple::ArchType parseARMArch(StringRef ArchName)
static Triple::OSType parseOS(StringRef OSName)
static StringRef getDXILArchNameFromShaderModel(StringRef ShaderModelStr)
static Triple::ArchType parseBPFArch(StringRef ArchName)
static Triple::ObjectFormatType parseFormat(StringRef EnvironmentName)
static Triple::VendorType parseVendor(StringRef VendorName)
Defines the llvm::VersionTuple class, which represents a version in the form major[....
ValueT lookup(const_arg_type_t< KeyT > Val) const
Return the entry for the specified key, or a default constructed value if no such entry exists.
bool contains(const_arg_type_t< KeyT > Val) const
Return true if the specified key is in the map, false otherwise.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
Represent a constant reference to a string, i.e.
std::pair< StringRef, StringRef > split(char Separator) const
Split into two substrings around the first occurrence of a separator character.
bool consume_back(StringRef Suffix)
Returns true if this StringRef has the given suffix and removes that suffix.
constexpr StringRef substr(size_t Start, size_t N=npos) const
Return a reference to the substring from [Start, Start + N).
bool starts_with(StringRef Prefix) const
Check if this string starts with the given Prefix.
constexpr bool empty() const
Check if the string is empty.
StringRef drop_front(size_t N=1) const
Return a StringRef equal to 'this' but with the first N elements dropped.
constexpr size_t size() const
Get the string size.
bool contains(StringRef Other) const
Return true if the given string is a substring of *this, and false otherwise.
bool ends_with(StringRef Suffix) const
Check if this string ends with the given Suffix.
bool consume_front(char Prefix)
Returns true if this StringRef has the given prefix and removes that prefix.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
StringSwitch & StartsWith(StringLiteral S, T Value)
StringSwitch & EndsWith(StringLiteral S, T Value)
StringSwitch & Cases(std::initializer_list< StringLiteral > CaseStrings, T Value)
Triple - Helper class for working with autoconf configuration names.
LLVM_ABI bool isMacOSXVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
Comparison function for checking OS X version compatibility, which handles supporting skewed version ...
LLVM_ABI VersionTuple getOSVersion() const
Parse the version number from the OS name component of the triple, if present.
bool isPPC() const
Tests whether the target is PowerPC (32- or 64-bit LE or BE).
LLVM_ABI StringRef getVendorName() const
Get the vendor (second) component of the triple.
LLVM_ABI VersionTuple getWatchOSVersion() const
Parse the version number as with getOSVersion.
LLVM_ABI void setArchName(StringRef Str)
Set the architecture (first) component of the triple by name.
LLVM_ABI void setObjectFormat(ObjectFormatType Kind)
Set the object file format.
LLVM_ABI llvm::Triple get32BitArchVariant() const
Form a triple with a 32-bit variant of the current architecture.
bool isOSCygMing() const
Tests for either Cygwin or MinGW OS.
Triple()=default
Default constructor is the same as an empty string and leaves all triple fields unknown.
bool isThumb() const
Tests whether the target is Thumb (little and big endian).
static LLVM_ABI VersionTuple getCanonicalVersionForOS(OSType OSKind, const VersionTuple &Version, bool IsInValidRange)
Returns a canonicalized OS version number for the specified OS.
CanonicalForm
Canonical form.
LLVM_ABI bool operator<(const Triple &Other) const
unsigned getArchPointerBitWidth() const
Returns the pointer width of this architecture.
LLVM_ABI llvm::Triple getLittleEndianArchVariant() const
Form a triple with a little endian variant of the current architecture.
bool isBPF() const
Tests whether the target is eBPF.
static LLVM_ABI StringRef getVendorTypeName(VendorType Kind)
Get the canonical name for the Kind vendor.
ObjectFormatType getObjectFormat() const
Get the object format for this triple.
SubArchType getSubArch() const
get the parsed subarchitecture type for this triple.
bool isX86() const
Tests whether the target is x86 (32- or 64-bit).
bool isArm64e() const
Tests whether the target is the Apple "arm64e" AArch64 subarch.
bool isOSBinFormatGOFF() const
Tests whether the OS uses the GOFF binary format.
bool isWindowsGNUEnvironment() const
LLVM_ABI void setVendorName(StringRef Str)
Set the vendor (second) component of the triple by name.
LLVM_ABI void setOSAndEnvironmentName(StringRef Str)
Set the operating system and optional environment components with a single string.
LLVM_ABI llvm::Triple get64BitArchVariant() const
Form a triple with a 64-bit variant of the current architecture.
LLVM_ABI bool isLittleEndian() const
Tests whether the target triple is little endian.
LLVM_ABI void setEnvironment(EnvironmentType Kind)
Set the environment (fourth) component of the triple to a known type.
LLVM_ABI StringRef getOSName() const
Get the operating system (third) component of the triple.
bool isSPIROrSPIRV() const
LLVM_ABI ExceptionHandling getDefaultExceptionHandling() const
LLVM_ABI void setTriple(const Twine &Str)
Set all components to the new triple Str.
OSType getOS() const
Get the parsed operating system type of this triple.
LLVM_ABI VersionTuple getEnvironmentVersion() const
Parse the version number from the OS name component of the triple, if present.
static LLVM_ABI std::string normalize(StringRef Str, CanonicalForm Form=CanonicalForm::ANY)
Turn an arbitrary machine specification into the canonical triple form (or something sensible that th...
static LLVM_ABI ArchType getArchTypeForLLVMName(StringRef Str)
The canonical type for the given LLVM architecture name (e.g., "x86").
ArchType getArch() const
Get the parsed architecture type of this triple.
LLVM_ABI bool operator==(const Triple &Other) const
LLVM_ABI unsigned getTrampolineSize() const
Returns the trampoline size in bytes for this configuration.
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
LLVM_ABI StringRef getEnvironmentName() const
Get the optional environment (fourth) component of the triple, or "" if empty.
bool isSimulatorEnvironment() const
LLVM_ABI VersionTuple getDXILVersion() const
Parse the DXIL version number from the OSVersion and DXIL version (SubArch).
const std::string & str() const
EnvironmentType getEnvironment() const
Get the parsed environment type of this triple.
LLVM_ABI VersionTuple getVulkanVersion() const
Parse the Vulkan version number from the OSVersion and SPIR-V version (SubArch).
LLVM_ABI VersionTuple getDriverKitVersion() const
Parse the version number as with getOSVersion.
static LLVM_ABI ArchType parseArch(StringRef Str)
Parse anything recognized as an architecture for the first field of the triple.
bool isOSWindowsOrUEFI() const
Tests whether the OS is Windows or UEFI.
static LLVM_ABI StringRef getArchTypeName(ArchType Kind)
Get the canonical name for the Kind architecture.
bool isOSBinFormatXCOFF() const
Tests whether the OS uses the XCOFF binary format.
static LLVM_ABI StringRef getOSTypeName(OSType Kind)
Get the canonical name for the Kind operating system.
bool isARM() const
Tests whether the target is ARM (little and big endian).
LLVM_ABI std::string merge(const Triple &Other) const
Merge target triples.
bool isOSLinux() const
Tests whether the OS is Linux.
static LLVM_ABI SubArchType parseSubArch(StringRef Str)
Parse the subarchitecture encoded in the first (architecture) field of the triple (e....
bool isRISCV() const
Tests whether the target is RISC-V (32- and 64-bit).
bool isAMDGCN() const
Tests whether the target is AMDGCN.
bool isNVPTX() const
Tests whether the target is NVPTX (32- or 64-bit).
bool isOSAIX() const
Tests whether the OS is AIX.
LLVM_ABI VersionTuple getMinimumSupportedOSVersion() const
Some platforms have different minimum supported OS versions that varies by the architecture specified...
LLVM_ABI bool isArch64Bit() const
Test whether the architecture is 64-bit.
LLVM_ABI StringRef getOSAndEnvironmentName() const
Get the operating system and optional environment components as a single string (separated by a '-' i...
@ ARMSubArch_v8m_mainline
@ ARMSubArch_v8m_baseline
@ ARMSubArch_v8_1m_mainline
LLVM_ABI bool getMacOSXVersion(VersionTuple &Version) const
Parse the version number as with getOSVersion and then translate generic "darwin" versions to the cor...
static LLVM_ABI bool isValidVersionForOS(OSType OSKind, const VersionTuple &Version)
Returns whether an OS version is invalid and would not map to an Apple OS.
bool isMacOSX() const
Is this a Mac OS X triple.
LLVM_ABI void setEnvironmentName(StringRef Str)
Set the optional environment (fourth) component of the triple by name.
LLVM_ABI void setOS(OSType Kind)
Set the operating system (third) component of the triple to a known type.
LLVM_ABI void setOSName(StringRef Str)
Set the operating system (third) component of the triple by name.
VendorType getVendor() const
Get the parsed vendor type of this triple.
bool isSPARC() const
Tests whether the target is SPARC.
bool isOSDarwin() const
Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, DriverKit, XROS, or bridgeOS).
static LLVM_ABI StringRef getEnvironmentTypeName(EnvironmentType Kind)
Get the canonical name for the Kind environment.
bool isOSVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
Helper function for doing comparisons against version numbers included in the target triple.
bool empty() const
Whether the triple is empty / default constructed.
bool isMIPS() const
Tests whether the target is MIPS (little and big endian, 32- or 64-bit).
bool isPS() const
Tests whether the target is the PS4 or PS5 platform.
bool isWasm() const
Tests whether the target is wasm (32- and 64-bit).
LLVM_ABI StringRef getArchName() const
Get the architecture (first) component of the triple.
bool isMacCatalystEnvironment() const
bool isAArch64() const
Tests whether the target is AArch64 (little and big endian).
static LLVM_ABI StringRef getObjectFormatTypeName(ObjectFormatType ObjectFormat)
Get the name for the Object format.
LLVM_ABI bool isArch16Bit() const
Test whether the architecture is 16-bit.
LLVM_ABI llvm::Triple getBigEndianArchVariant() const
Form a triple with a big endian variant of the current architecture.
LLVM_ABI VersionTuple getiOSVersion() const
Parse the version number as with getOSVersion.
LLVM_ABI StringRef getEnvironmentVersionString() const
Get the version component of the environment component as a single string (the version after the envi...
LLVM_ABI bool isArch32Bit() const
Test whether the architecture is 32-bit.
LLVM_ABI bool isCompatibleWith(const Triple &Other) const
Test whether target triples are compatible.
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
bool hasEnvironment() const
Does this triple have the optional environment (fourth) component?
LLVM_ABI unsigned getDefaultWCharSize() const
Returns the default wchar_t size (in bytes) for this target triple.
static LLVM_ABI StringRef getArchTypePrefix(ArchType Kind)
Get the "prefix" canonical name for the Kind architecture.
LLVM_ABI void setArch(ArchType Kind, SubArchType SubArch=NoSubArch)
Set the architecture (first) component of the triple to a known type.
LLVM_ABI void setVendor(VendorType Kind)
Set the vendor (second) component of the triple to a known type.
bool isLoongArch() const
Tests whether the target is LoongArch (32- and 64-bit).
bool isWindowsItaniumEnvironment() const
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
LLVM_ABI std::string str() const
Return the twine contents as a std::string.
Represents a version number in the form major[.minor[.subminor[.build]]].
unsigned getMajor() const
Retrieve the major version number.
LLVM_ABI bool tryParse(StringRef string)
Try to parse the given string as a version number.
bool empty() const
Determine whether this version information is empty (e.g., all version components are zero).
std::optional< unsigned > getMinor() const
Retrieve the minor version number, if provided.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
LLVM_ABI std::string mergeSubArch(const Triple &A, const Triple &B)
Returns the effective triple appropriate to use when linking B into A by merging the subarches in cas...
LLVM_ABI bool isSubArchCompatible(const Triple &A, const Triple &B)
Return true if subarch A is compatible with subarch B, i.e.
LLVM_ABI StringRef getCanonicalArchName(StringRef Arch)
MArch is expected to be of the form (arm|thumb)?(eb)?(v.
LLVM_ABI ISAKind parseArchISA(StringRef Arch)
LLVM_ABI ArchKind parseArch(StringRef Arch)
LLVM_ABI ProfileKind parseArchProfile(StringRef Arch)
LLVM_ABI unsigned parseArchVersion(StringRef Arch)
LLVM_ABI EndianKind parseArchEndian(StringRef Arch)
@ C
The default llvm calling convention, compatible with C.
constexpr bool IsLittleEndianHost
This is an optimization pass for GlobalISel generic memory operations.
@ SjLj
setjmp/longjmp based exceptions
@ ZOS
z/OS MVS Exception Handling.
@ None
No exception support.
@ AIX
AIX Exception Handling.
@ DwarfCFI
DWARF-like instruction based exceptions.
@ WinEH
Windows Exception Handling.
LLVM_ABI void report_fatal_error(Error Err, bool gen_crash_diag=true)
std::string join(IteratorT Begin, IteratorT End, StringRef Separator)
Joins the strings in the range [Begin, End), adding Separator between the elements.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
@ Default
The result value is uniform if and only if all operands are uniform.
LLVM_ABI void reportFatalUsageError(Error Err)
Report a fatal error that does not indicate a bug in LLVM.
Implement std::hash so that hash_code can be used in STL containers.
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.