31 case amdgcn:
return "amdgcn";
33 case amdil:
return "amdil";
34 case arc:
return "arc";
35 case arm:
return "arm";
36 case armeb:
return "armeb";
37 case avr:
return "avr";
38 case bpfeb:
return "bpfeb";
39 case bpfel:
return "bpfel";
40 case csky:
return "csky";
41 case dxil:
return "dxil";
44 case hsail:
return "hsail";
46 case lanai:
return "lanai";
49 case m68k:
return "m68k";
50 case mips64:
return "mips64";
52 case mips:
return "mips";
53 case mipsel:
return "mipsel";
54 case msp430:
return "msp430";
56 case nvptx:
return "nvptx";
57 case ppc64:
return "powerpc64";
58 case ppc64le:
return "powerpc64le";
59 case ppc:
return "powerpc";
60 case ppcle:
return "powerpcle";
61 case r600:
return "r600";
70 case shave:
return "shave";
71 case sparc:
return "sparc";
74 case spir64:
return "spir64";
75 case spir:
return "spir";
76 case spirv:
return "spirv";
80 case tce:
return "tce";
81 case tcele:
return "tcele";
82 case thumb:
return "thumb";
85 case wasm32:
return "wasm32";
86 case wasm64:
return "wasm64";
87 case x86:
return "i386";
88 case x86_64:
return "x86_64";
89 case xcore:
return "xcore";
90 case xtensa:
return "xtensa";
100 return "mipsisa32r6";
104 return "mipsisa32r6el";
108 return "mipsisa64r6";
112 return "mipsisa64r6el";
180 case arc:
return "arc";
187 case avr:
return "avr";
192 case ppcle:
return "ppc";
194 case m68k:
return "m68k";
201 case hexagon:
return "hexagon";
203 case amdgcn:
return "amdgcn";
204 case r600:
return "r600";
207 case bpfeb:
return "bpf";
211 case sparc:
return "sparc";
216 case x86_64:
return "x86";
218 case xcore:
return "xcore";
221 case nvptx:
return "nvvm";
231 case spir64:
return "spir";
237 case kalimba:
return "kalimba";
238 case lanai:
return "lanai";
239 case shave:
return "shave";
241 case wasm64:
return "wasm";
249 case ve:
return "ve";
250 case csky:
return "csky";
255 case dxil:
return "dx";
257 case xtensa:
return "xtensa";
265 case AMD:
return "amd";
266 case Apple:
return "apple";
267 case CSR:
return "csr";
269 case IBM:
return "ibm";
273 case Mesa:
return "mesa";
275 case NVIDIA:
return "nvidia";
277 case PC:
return "pc";
278 case SCEI:
return "scei";
279 case SUSE:
return "suse";
291 case AIX:
return "aix";
292 case AMDHSA:
return "amdhsa";
293 case AMDPAL:
return "amdpal";
295 case CUDA:
return "cuda";
296 case Darwin:
return "darwin";
301 case FreeBSD:
return "freebsd";
302 case Fuchsia:
return "fuchsia";
303 case Haiku:
return "haiku";
305 case Hurd:
return "hurd";
306 case IOS:
return "ios";
308 case Linux:
return "linux";
309 case Lv2:
return "lv2";
310 case MacOSX:
return "macosx";
313 case Mesa3D:
return "mesa3d";
314 case NVCL:
return "nvcl";
315 case NetBSD:
return "netbsd";
316 case OpenBSD:
return "openbsd";
317 case PS4:
return "ps4";
318 case PS5:
return "ps5";
319 case RTEMS:
return "rtems";
320 case Solaris:
return "solaris";
322 case TvOS:
return "tvos";
323 case UEFI:
return "uefi";
324 case WASI:
return "wasi";
325 case WatchOS:
return "watchos";
326 case Win32:
return "windows";
327 case ZOS:
return "zos";
329 case LiteOS:
return "liteos";
330 case XROS:
return "xros";
331 case Vulkan:
return "vulkan";
333 return "cheriotrtos";
342 case Android:
return "android";
343 case CODE16:
return "code16";
344 case CoreCLR:
return "coreclr";
345 case Cygnus:
return "cygnus";
346 case EABI:
return "eabi";
347 case EABIHF:
return "eabihf";
348 case GNU:
return "gnu";
349 case GNUT64:
return "gnut64";
352 case GNUEABI:
return "gnueabi";
356 case GNUF32:
return "gnuf32";
357 case GNUF64:
return "gnuf64";
358 case GNUSF:
return "gnusf";
359 case GNUX32:
return "gnux32";
361 case Itanium:
return "itanium";
362 case MSVC:
return "msvc";
363 case MacABI:
return "macabi";
364 case Musl:
return "musl";
375 case MuslX32:
return "muslx32";
377 case Pixel:
return "pixel";
378 case Vertex:
return "vertex";
380 case Hull:
return "hull";
381 case Domain:
return "domain";
382 case Compute:
return "compute";
383 case Library:
return "library";
386 case AnyHit:
return "anyhit";
388 case Miss:
return "miss";
390 case Mesh:
return "mesh";
411 case COFF:
return "coff";
412 case ELF:
return "elf";
413 case GOFF:
return "goff";
414 case MachO:
return "macho";
415 case Wasm:
return "wasm";
416 case XCOFF:
return "xcoff";
418 case SPIRV:
return "spirv";
424 if (ArchName ==
"bpf") {
429 }
else if (ArchName ==
"bpf_be" || ArchName ==
"bpfeb") {
431 }
else if (ArchName ==
"bpf_le" || ArchName ==
"bpfel") {
554 if (ArchName.
empty())
602 .
Cases(
"mips",
"mipseb",
"mipsallegrex",
"mipsisa32r6",
604 .
Cases(
"mipsel",
"mipsallegrexel",
"mipsisa32r6el",
"mipsr6el",
606 .
Cases(
"mips64",
"mips64eb",
"mipsn32",
"mipsisa64r6",
608 .
Cases(
"mips64el",
"mipsn32el",
"mipsisa64r6el",
"mips64r6el",
633 .
Cases(
"spirv32",
"spirv32v1.0",
"spirv32v1.1",
"spirv32v1.2",
634 "spirv32v1.3",
"spirv32v1.4",
"spirv32v1.5",
636 .
Cases(
"spirv64",
"spirv64v1.0",
"spirv64v1.1",
"spirv64v1.2",
637 "spirv64v1.3",
"spirv64v1.4",
"spirv64v1.5",
650 .
Cases(
"dxil",
"dxilv1.0",
"dxilv1.1",
"dxilv1.2",
"dxilv1.3",
651 "dxilv1.4",
"dxilv1.5",
"dxilv1.6",
"dxilv1.7",
814 if (SubArchName ==
"powerpcspe")
817 if (SubArchName ==
"arm64e")
820 if (SubArchName ==
"arm64ec")
850 if (ARMSubArch.
empty())
859 case ARM::ArchKind::ARMV4:
861 case ARM::ArchKind::ARMV4T:
863 case ARM::ArchKind::ARMV5T:
865 case ARM::ArchKind::ARMV5TE:
866 case ARM::ArchKind::IWMMXT:
867 case ARM::ArchKind::IWMMXT2:
868 case ARM::ArchKind::XSCALE:
869 case ARM::ArchKind::ARMV5TEJ:
871 case ARM::ArchKind::ARMV6:
873 case ARM::ArchKind::ARMV6K:
874 case ARM::ArchKind::ARMV6KZ:
876 case ARM::ArchKind::ARMV6T2:
878 case ARM::ArchKind::ARMV6M:
880 case ARM::ArchKind::ARMV7A:
881 case ARM::ArchKind::ARMV7R:
883 case ARM::ArchKind::ARMV7VE:
885 case ARM::ArchKind::ARMV7K:
887 case ARM::ArchKind::ARMV7M:
889 case ARM::ArchKind::ARMV7S:
891 case ARM::ArchKind::ARMV7EM:
893 case ARM::ArchKind::ARMV8A:
895 case ARM::ArchKind::ARMV8_1A:
897 case ARM::ArchKind::ARMV8_2A:
899 case ARM::ArchKind::ARMV8_3A:
901 case ARM::ArchKind::ARMV8_4A:
903 case ARM::ArchKind::ARMV8_5A:
905 case ARM::ArchKind::ARMV8_6A:
907 case ARM::ArchKind::ARMV8_7A:
909 case ARM::ArchKind::ARMV8_8A:
911 case ARM::ArchKind::ARMV8_9A:
913 case ARM::ArchKind::ARMV9A:
915 case ARM::ArchKind::ARMV9_1A:
917 case ARM::ArchKind::ARMV9_2A:
919 case ARM::ArchKind::ARMV9_3A:
921 case ARM::ArchKind::ARMV9_4A:
923 case ARM::ArchKind::ARMV9_5A:
925 case ARM::ArchKind::ARMV9_6A:
927 case ARM::ArchKind::ARMV8R:
929 case ARM::ArchKind::ARMV8MBaseline:
931 case ARM::ArchKind::ARMV8MMainline:
933 case ARM::ArchKind::ARMV8_1MMainline:
941 switch (
T.getArch()) {
1004 if (
T.isOSWindows())
1044 if (Components.
size() > 0) {
1047 if (Components.
size() > 1) {
1049 if (Components.
size() > 2) {
1051 if (Components.
size() > 3) {
1080 :
Data((ArchStr +
Twine(
'-') + VendorStr +
Twine(
'-') + OSStr).str()),
1085 Environment(), ObjectFormat(
Triple::UnknownObjectFormat) {
1095 const Twine &EnvironmentStr)
1097 EnvironmentStr).str()),
1115 const unsigned SMMajor = 6;
1118 if (std::optional<unsigned> SMMinor = Ver.
getMinor()) {
1146 if (ShaderModelStr ==
"shadermodel6.x") {
1156 bool IsMinGW32 =
false;
1157 bool IsCygwin =
false;
1161 Str.split(Components,
'-');
1169 if (Components.
size() > 0)
1172 if (Components.
size() > 1)
1175 if (Components.
size() > 2) {
1177 IsCygwin = Components[2].starts_with(
"cygwin") ||
1178 Components[2].starts_with(
"msys");
1179 IsMinGW32 = Components[2].starts_with(
"mingw");
1182 if (Components.
size() > 3)
1185 if (Components.
size() > 4)
1199 for (
unsigned Pos = 0; Pos != std::size(Found); ++Pos) {
1205 if (
Idx < std::size(Found) && Found[
Idx])
1251 for (
unsigned i = Pos; !CurrentComponent.
empty(); ++i) {
1253 while (i < std::size(Found) && Found[i])
1257 std::swap(CurrentComponent, Components[i]);
1259 }
else if (Pos >
Idx) {
1266 for (
unsigned i =
Idx; i < Components.
size();) {
1269 std::swap(CurrentComponent, Components[i]);
1271 if (CurrentComponent.
empty())
1274 while (++i < std::size(Found) && Found[i])
1278 if (!CurrentComponent.
empty())
1282 while (++
Idx < std::size(Found) && Found[
Idx])
1284 }
while (
Idx < Pos);
1286 assert(Pos < Components.
size() && Components[Pos] == Comp &&
1287 "Component moved wrong!");
1295 if (Found[0] && !Found[1] && !Found[2] && Found[3] &&
1296 Components[1] ==
"none" && Components[2].
empty())
1297 std::swap(Components[1], Components[2]);
1306 std::string NormalizedEnvironment;
1309 StringRef AndroidVersion = Components[3].drop_front(strlen(
"androideabi"));
1310 if (AndroidVersion.
empty()) {
1311 Components[3] =
"android";
1313 NormalizedEnvironment =
Twine(
"android", AndroidVersion).
str();
1314 Components[3] = NormalizedEnvironment;
1320 Components[3] =
"gnueabihf";
1324 Components[2] =
"windows";
1327 Components[3] =
"msvc";
1331 }
else if (IsMinGW32) {
1333 Components[2] =
"windows";
1334 Components[3] =
"gnu";
1335 }
else if (IsCygwin) {
1337 Components[2] =
"windows";
1338 Components[3] =
"cygnus";
1340 if (IsMinGW32 || IsCygwin ||
1353 if (Components[0] ==
"dxil") {
1354 if (Components.
size() > 4) {
1370 Components.
resize(
static_cast<unsigned>(Form),
"unknown");
1376 return join(Components,
"-");
1385 return Tmp.
split(
'-').first;
1390 Tmp = Tmp.
split(
'-').second;
1391 return Tmp.
split(
'-').first;
1396 Tmp = Tmp.
split(
'-').second;
1397 return Tmp.
split(
'-').second;
1402 return Tmp.
split(
'-').second;
1408 return Version.withoutBuild();
1420 if (EnvironmentName ==
"none")
1426 if (EnvironmentName.
contains(
"-")) {
1431 const std::string tmp = (
Twine(
"-") + ObjectFormatTypeName).
str();
1435 return EnvironmentName;
1465 if (
Version.getMajor() <= 19) {
1467 }
else if (
Version.getMajor() < 25) {
1477 if (
Version.getMajor() == 0) {
1479 }
else if (
Version.getMajor() < 10) {
1581 return Version.withMajorReplaced(19);
1603 if (ValidVersionMap.
contains(VulkanVersion) &&
1604 (ValidVersionMap.
lookup(VulkanVersion) == SpirvVersion ||
1606 return VulkanVersion;
2155 if (
Other.isOSVersionLT(*
this))
2162 unsigned Micro)
const {
2172 assert(Major >= 11 &&
"Unexpected major version");
2217 bool IsInValidRange) {
2218 const unsigned MacOSRangeBump = 10;
2219 const unsigned IOSRangeBump = 7;
2220 const unsigned XROSRangeBump = 23;
2221 const unsigned WatchOSRangeBump = 14;
2230 if (!IsInValidRange)
2231 return Version.withMajorReplaced(
Version.getMajor() + MacOSRangeBump);
2239 if (!IsInValidRange)
2240 return Version.withMajorReplaced(
Version.getMajor() + IOSRangeBump);
2247 if (!IsInValidRange)
2248 return Version.withMajorReplaced(
Version.getMajor() + XROSRangeBump);
2255 if (!IsInValidRange)
2256 return Version.withMajorReplaced(
Version.getMajor() + WatchOSRangeBump);
2269 auto IsValid = [&](
const VersionTuple &StartingVersion) {
2270 return !((
Version > StartingVersion) && (
Version < CommonVersion));
2275 return IsValid(StartingWatchOS);
2280 return IsValid(StartingIOS);
2284 return IsValid(StartingMacOS);
2288 return IsValid(StartingXROS);
2349 "incorrect HLSL stage order");
2351 "incorrect HLSL stage order");
2353 "incorrect HLSL stage order");
2355 "incorrect HLSL stage order");
2357 "incorrect HLSL stage order");
2359 "incorrect HLSL stage order");
2361 "incorrect HLSL stage order");
2363 "incorrect HLSL stage order");
2365 "incorrect HLSL stage order");
2367 "incorrect HLSL stage order");
2369 "incorrect HLSL stage order");
2371 "incorrect HLSL stage order");
2373 "incorrect HLSL stage order");
2375 "incorrect HLSL stage order");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
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::SubArchType parseSubArch(StringRef SubArchName)
static Triple::ObjectFormatType parseFormat(StringRef EnvironmentName)
static Triple::ArchType parseArch(StringRef ArchName)
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
lookup - Return the entry for the specified key, or a default constructed value if no such entry exis...
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.
StringRef - 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
empty - 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
size - Get the string size.
bool contains(StringRef Other) const
Return true if the given string is a substring of *this, and false otherwise.
bool consume_front(StringRef Prefix)
Returns true if this StringRef has the given prefix and removes that prefix.
bool ends_with(StringRef Suffix) const
Check if this string ends with the given Suffix.
A switch()-like statement whose cases are string literals.
StringSwitch & Case(StringLiteral S, T Value)
StringSwitch & StartsWith(StringLiteral S, T Value)
StringSwitch & Cases(StringLiteral S0, StringLiteral S1, T Value)
StringSwitch & EndsWith(StringLiteral S, 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.
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 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 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.
bool isRISCV() const
Tests whether the target is RISC-V (32- and 64-bit).
@ ImaginationTechnologies
bool isNVPTX() const
Tests whether the target is NVPTX (32- or 64-bit).
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 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?
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.
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 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)
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
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.