LLVM 24.0.0git
Triple.h
Go to the documentation of this file.
1//===-- llvm/TargetParser/Triple.h - Target triple helper class--*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_TARGETPARSER_TRIPLE_H
10#define LLVM_TARGETPARSER_TRIPLE_H
11
12#include "llvm/ADT/StringRef.h"
16
17// Some system headers or GCC predefined macros conflict with identifiers in
18// this file. Undefine them here.
19#undef NetBSD
20#undef mips
21#undef sparc
22
23namespace llvm {
24enum class ExceptionHandling;
25class Twine;
26
27/// Triple - Helper class for working with autoconf configuration names. For
28/// historical reasons, we also call these 'triples' (they used to contain
29/// exactly three fields).
30///
31/// Configuration names are strings in the canonical form:
32/// ARCHITECTURE-VENDOR-OPERATING_SYSTEM
33/// or
34/// ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT
35///
36/// This class is used for clients which want to support arbitrary
37/// configuration names, but also want to implement certain special
38/// behavior for particular configurations. This class isolates the mapping
39/// from the components of the configuration name to well known IDs.
40///
41/// At its core the Triple class is designed to be a wrapper for a triple
42/// string; the constructor does not change or normalize the triple string.
43/// Clients that need to handle the non-canonical triples that users often
44/// specify should use the normalize method.
45///
46/// See autoconf/config.guess for a glimpse into what configuration names
47/// look like in practice.
48class Triple {
49public:
50 enum ArchType {
52
53 arm, // ARM (little endian): arm, armv.*, xscale
54 armeb, // ARM (big endian): armeb
55 aarch64, // AArch64 (little endian): aarch64
56 aarch64_be, // AArch64 (big endian): aarch64_be
57 aarch64_32, // AArch64 (little endian) ILP32: aarch64_32
58 arc, // ARC: Synopsys ARC
59 avr, // AVR: Atmel AVR microcontroller
60 bpfel, // eBPF or extended BPF or 64-bit BPF (little endian)
61 bpfeb, // eBPF or extended BPF or 64-bit BPF (big endian)
62 csky, // CSKY: csky
63 dxil, // DXIL 32-bit DirectX bytecode
64 hexagon, // Hexagon: hexagon
65 loongarch32, // LoongArch (32-bit): loongarch32
66 loongarch64, // LoongArch (64-bit): loongarch64
67 m68k, // M68k: Motorola 680x0 family
68 mips, // MIPS: mips, mipsallegrex, mipsr6
69 mipsel, // MIPSEL: mipsel, mipsallegrexe, mipsr6el
70 mips64, // MIPS64: mips64, mips64r6, mipsn32, mipsn32r6
71 mips64el, // MIPS64EL: mips64el, mips64r6el, mipsn32el, mipsn32r6el
72 msp430, // MSP430: msp430
73 ppc, // PPC: powerpc
74 ppcle, // PPCLE: powerpc (little endian)
75 ppc64, // PPC64: powerpc64, ppu
76 ppc64le, // PPC64LE: powerpc64le
77 r600, // R600: AMD GPUs HD2XXX - HD6XXX
78 amdgpu, // AMDGPU: AMD GCN+ GPUs
79 riscv32, // RISC-V (32-bit, little endian): riscv32
80 riscv64, // RISC-V (64-bit, little endian): riscv64
81 riscv32be, // RISC-V (32-bit, big endian): riscv32be
82 riscv64be, // RISC-V (64-bit, big endian): riscv64be
83 sparc, // Sparc: sparc
84 sparcv9, // Sparcv9: Sparcv9
85 sparcel, // Sparc: (endianness = little). NB: 'Sparcle' is a CPU variant
86 systemz, // SystemZ: s390x
87 // OpenASIP (http://openasip.org) / big endian 32b targets: tce
89 // OpenASIP (http://openasip.org) / little endian 32b targets: tcele
91 // OpenASIP (http://openasip.org) / little endian 64b targets: tcele
93 thumb, // Thumb (little endian): thumb, thumbv.*
94 thumbeb, // Thumb (big endian): thumbeb
95 x86, // X86: i[3-9]86
96 x86_64, // X86-64: amd64, x86_64
97 xcore, // XCore: xcore
98 xtensa, // Tensilica: Xtensa
99 nvptx, // NVPTX: 32-bit
100 nvptx64, // NVPTX: 64-bit
101 amdil, // AMDIL
102 amdil64, // AMDIL with 64-bit pointers
103 hsail, // AMD HSAIL
104 hsail64, // AMD HSAIL with 64-bit pointers
105 spir, // SPIR: standard portable IR for OpenCL 32-bit version
106 spir64, // SPIR: standard portable IR for OpenCL 64-bit version
107 spirv, // SPIR-V with logical memory layout.
108 spirv32, // SPIR-V with 32-bit pointers
109 spirv64, // SPIR-V with 64-bit pointers
110 kalimba, // Kalimba: generic kalimba
111 shave, // SHAVE: Movidius vector VLIW processors
112 lanai, // Lanai: Lanai 32-bit
113 wasm32, // WebAssembly with 32-bit pointers
114 wasm64, // WebAssembly with 64-bit pointers
115 renderscript32, // 32-bit RenderScript
116 renderscript64, // 64-bit RenderScript
117 ve, // NEC SX-Aurora Vector Engine
119 };
122
158
162
164
168
170
172
173 // SPIR-V sub-arch corresponds to its version.
181
182 // DXIL sub-arch corresponds to its version.
194
195 // AMDGPU sub-arch
200
208
214
215 // 810 is its own major arch.
217
225
226 // 908 and 90a are not covered by a generic target, and are their own major
227 // subarches.
230
234
240
249
260
265
269
274
279 };
300 enum OSType {
302
310 Lv2, // PS3
322 CUDA, // NVIDIA CUDA
323 NVCL, // NVIDIA OpenCL
324 AMDHSA, // AMD HSA Runtime
328 TvOS, // Apple tvOS
329 WatchOS, // Apple watchOS
330 BridgeOS, // Apple bridgeOS
331 DriverKit, // Apple DriverKit
332 XROS, // Apple XROS
334 AMDPAL, // AMD PAL Runtime
335 HermitCore, // HermitCore Unikernel/Multikernel
336 Hurd, // GNU/Hurd
337 WASI, // Deprecated alias of WASI 0.1; in the future will be WASI 1.0.
338 WASIp1, // WASI 0.1
339 WASIp2, // WASI 0.2
340 WASIp3, // WASI 0.3
342 ShaderModel, // DirectX ShaderModel
345 Vulkan, // Vulkan SPIR-V
353 };
356
384
389 Simulator, // Simulator variants of other systems, e.g., Apple's iOS
390 MacABI, // Mac Catalyst variant of Apple's iOS deployment target.
391
392 // Shader Stages
393 // The order of these values matters, and must be kept in sync with the
394 // language options enum in Clang. The ordering is enforced in
395 // static_asserts in Triple.cpp and in Clang.
414
418 };
431
432private:
433 std::string Data;
434
435 /// The parsed arch type.
436 ArchType Arch{};
437
438 /// The parsed subarchitecture type.
439 SubArchType SubArch{};
440
441 /// The parsed vendor type.
442 VendorType Vendor{};
443
444 /// The parsed OS type.
445 OSType OS{};
446
447 /// The parsed Environment type.
448 EnvironmentType Environment{};
449
450 /// The object format type.
451 ObjectFormatType ObjectFormat{};
452
453public:
454 /// @name Constructors
455 /// @{
456
457 /// Default constructor is the same as an empty string and leaves all
458 /// triple fields unknown.
459 Triple() = default;
460
461 LLVM_ABI explicit Triple(std::string &&Str);
462 explicit Triple(StringRef Str) : Triple(Str.str()) {}
463 explicit Triple(const char *Str) : Triple(std::string(Str)) {}
464 explicit Triple(const std::string &Str) : Triple(std::string(Str)) {}
465 LLVM_ABI explicit Triple(const Twine &Str);
466
467 LLVM_ABI Triple(const Twine &ArchStr, const Twine &VendorStr,
468 const Twine &OSStr);
469 LLVM_ABI Triple(const Twine &ArchStr, const Twine &VendorStr,
470 const Twine &OSStr, const Twine &EnvironmentStr);
471 LLVM_ABI Triple(ArchType A, SubArchType SA = NoSubArch,
472 VendorType V = UnknownVendor, OSType OS = UnknownOS);
473 LLVM_ABI Triple(ArchType A, SubArchType SA, VendorType V, OSType OS,
474 EnvironmentType E);
475 LLVM_ABI Triple(ArchType A, SubArchType SA, VendorType V, OSType OS,
476 EnvironmentType E, ObjectFormatType OF);
477
478 LLVM_ABI bool operator==(const Triple &Other) const;
479 bool operator!=(const Triple &Other) const { return !(*this == Other); }
480
481 LLVM_ABI bool operator<(const Triple &Other) const;
482
483 /// @}
484 /// @name Normalization
485 /// @{
486
487 /// Canonical form
488 enum class CanonicalForm {
489 ANY = 0,
490 THREE_IDENT = 3, // ARCHITECTURE-VENDOR-OPERATING_SYSTEM
491 FOUR_IDENT = 4, // ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT
492 FIVE_IDENT = 5, // ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT-FORMAT
493 };
494
495 /// Turn an arbitrary machine specification into the canonical triple form (or
496 /// something sensible that the Triple class understands if nothing better can
497 /// reasonably be done). In particular, it handles the common case in which
498 /// otherwise valid components are in the wrong order. \p Form is used to
499 /// specify the output canonical form.
500 LLVM_ABI static std::string
502
503 /// Return the normalized form of this triple's string.
504 std::string normalize(CanonicalForm Form = CanonicalForm::ANY) const {
505 return normalize(Data, Form);
506 }
507
508 /// @}
509 /// @name Typed Component Access
510 /// @{
511
512 /// Get the parsed architecture type of this triple.
513 ArchType getArch() const { return Arch; }
514
515 /// get the parsed subarchitecture type for this triple.
516 SubArchType getSubArch() const { return SubArch; }
517
518 /// Get the parsed vendor type of this triple.
519 VendorType getVendor() const { return Vendor; }
520
521 /// Get the parsed operating system type of this triple.
522 OSType getOS() const { return OS; }
523
524 /// Does this triple have the optional environment (fourth) component?
525 bool hasEnvironment() const { return getEnvironmentName() != ""; }
526
527 /// Get the parsed environment type of this triple.
528 EnvironmentType getEnvironment() const { return Environment; }
529
530 /// Parse the version number from the OS name component of the
531 /// triple, if present.
532 ///
533 /// For example, "fooos1.2.3" would return (1, 2, 3).
535
536 /// Get the object format for this triple.
537 ObjectFormatType getObjectFormat() const { return ObjectFormat; }
538
539 /// Parse the version number from the OS name component of the triple, if
540 /// present.
541 ///
542 /// For example, "fooos1.2.3" would return (1, 2, 3).
544
545 /// Return just the major version number, this is specialized because it is a
546 /// common query.
547 unsigned getOSMajorVersion() const { return getOSVersion().getMajor(); }
548
549 /// Parse the version number as with getOSVersion and then translate generic
550 /// "darwin" versions to the corresponding OS X versions. This may also be
551 /// called with IOS triples but the OS X version number is just set to a
552 /// constant 10.4.0 in that case. Returns true if successful.
554
555 /// Parse the version number as with getOSVersion. This should only be called
556 /// with IOS or generic triples.
558
559 /// Parse the version number as with getOSVersion. This should only be called
560 /// with WatchOS or generic triples.
562
563 /// Parse the version number as with getOSVersion.
565
566 /// Parse the Vulkan version number from the OSVersion and SPIR-V version
567 /// (SubArch). This should only be called with Vulkan SPIR-V triples.
569
570 /// Parse the DXIL version number from the OSVersion and DXIL version
571 /// (SubArch). This should only be called with DXIL triples.
573
574 /// @}
575 /// @name Direct Component Access
576 /// @{
577
578 const std::string &str() const { return Data; }
579
580 const std::string &getTriple() const { return Data; }
581
582 /// Whether the triple is empty / default constructed.
583 bool empty() const { return Data.empty(); }
584
585 /// Get the architecture (first) component of the triple.
587
588 /// Get the vendor (second) component of the triple.
590
591 /// Get the operating system (third) component of the triple.
593
594 /// Get the optional environment (fourth) component of the triple, or "" if
595 /// empty.
597
598 /// Get the operating system and optional environment components as a single
599 /// string (separated by a '-' if the environment component is present).
601
602 /// Get the version component of the environment component as a single
603 /// string (the version after the environment).
604 ///
605 /// For example, "fooos1.2.3" would return "1.2.3".
607
608 /// @}
609 /// @name Convenience Predicates
610 /// @{
611
612 /// Returns the pointer width of this architecture.
614
615 /// Returns the pointer width of this architecture.
616 unsigned getArchPointerBitWidth() const {
618 }
619
620 /// Returns the trampoline size in bytes for this configuration.
621 LLVM_ABI unsigned getTrampolineSize() const;
622
623 /// Test whether the architecture is 64-bit
624 ///
625 /// Note that this tests for 64-bit pointer width, and nothing else. Note
626 /// that we intentionally expose only three predicates, 64-bit, 32-bit, and
627 /// 16-bit. The inner details of pointer width for particular architectures
628 /// is not summed up in the triple, and so only a coarse grained predicate
629 /// system is provided.
630 LLVM_ABI bool isArch64Bit() const;
631
632 /// Test whether the architecture is 32-bit
633 ///
634 /// Note that this tests for 32-bit pointer width, and nothing else.
635 LLVM_ABI bool isArch32Bit() const;
636
637 /// Test whether the architecture is 16-bit
638 ///
639 /// Note that this tests for 16-bit pointer width, and nothing else.
640 LLVM_ABI bool isArch16Bit() const;
641
642 /// Helper function for doing comparisons against version numbers included in
643 /// the target triple.
644 bool isOSVersionLT(unsigned Major, unsigned Minor = 0,
645 unsigned Micro = 0) const {
646 if (Minor == 0) {
647 return getOSVersion() < VersionTuple(Major);
648 }
649 if (Micro == 0) {
650 return getOSVersion() < VersionTuple(Major, Minor);
651 }
652 return getOSVersion() < VersionTuple(Major, Minor, Micro);
653 }
654
655 bool isOSVersionGE(unsigned Major, unsigned Minor = 0,
656 unsigned Micro = 0) const {
657 return !isOSVersionLT(Major, Minor, Micro);
658 }
659
660 bool isOSVersionLT(const Triple &Other) const {
661 return getOSVersion() < Other.getOSVersion();
662 }
663
664 bool isOSVersionGE(const Triple &Other) const {
665 return getOSVersion() >= Other.getOSVersion();
666 }
667
668 /// Comparison function for checking OS X version compatibility, which handles
669 /// supporting skewed version numbering schemes used by the "darwin" triples.
670 LLVM_ABI bool isMacOSXVersionLT(unsigned Major, unsigned Minor = 0,
671 unsigned Micro = 0) const;
672
673 bool isMacOSXVersionGE(unsigned Major, unsigned Minor = 0,
674 unsigned Micro = 0) const {
675 return !isMacOSXVersionLT(Major, Minor, Micro);
676 }
677
678 /// Is this a Mac OS X triple. For legacy reasons, we support both "darwin"
679 /// and "osx" as OS X triples.
680 bool isMacOSX() const {
681 return getOS() == Triple::Darwin || getOS() == Triple::MacOSX;
682 }
683
684 /// Is this an iOS triple.
685 /// Note: This identifies tvOS as a variant of iOS. If that ever
686 /// changes, i.e., if the two operating systems diverge or their version
687 /// numbers get out of sync, that will need to be changed.
688 /// watchOS has completely different version numbers so it is not included.
689 bool isiOS() const { return getOS() == Triple::IOS || isTvOS(); }
690
691 /// Is this an Apple tvOS triple.
692 bool isTvOS() const { return getOS() == Triple::TvOS; }
693
694 /// Is this an Apple watchOS triple.
695 bool isWatchOS() const { return getOS() == Triple::WatchOS; }
696
697 bool isWatchABI() const { return getSubArch() == Triple::ARMSubArch_v7k; }
698
699 /// Is this an Apple XROS triple.
700 bool isXROS() const { return getOS() == Triple::XROS; }
701
702 /// Is this an Apple BridgeOS triple.
703 bool isBridgeOS() const { return getOS() == Triple::BridgeOS; }
704
705 /// Is this an Apple DriverKit triple.
706 bool isDriverKit() const { return getOS() == Triple::DriverKit; }
707
708 bool isOSzOS() const { return getOS() == Triple::ZOS; }
709
710 /// Is this an Apple MachO triple.
711 bool isAppleMachO() const {
712 return (getVendor() == Triple::Apple) && isOSBinFormatMachO();
713 }
714
715 /// Is this an Apple firmware triple.
716 bool isAppleFirmware() const {
717 return (getVendor() == Triple::Apple) && isOSFirmware();
718 }
719
720 /// Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, DriverKit, XROS, or
721 /// bridgeOS).
722 bool isOSDarwin() const {
723 return isMacOSX() || isiOS() || isWatchOS() || isDriverKit() || isXROS() ||
725 // Apple firmware isn't necessarily a Darwin based OS, but for most intents
726 // and purposes it can be treated like a Darwin OS in the compiler.
727 }
728
731 }
732
734 return getEnvironment() == Triple::MacABI;
735 }
736
737 /// Returns true for targets that run on a macOS machine.
738 bool isTargetMachineMac() const {
739 return isMacOSX() || (isOSDarwin() && (isSimulatorEnvironment() ||
741 }
742
743 bool isOSNetBSD() const { return getOS() == Triple::NetBSD; }
744
745 bool isOSOpenBSD() const { return getOS() == Triple::OpenBSD; }
746
747 bool isOSFreeBSD() const { return getOS() == Triple::FreeBSD; }
748
749 bool isOSFuchsia() const { return getOS() == Triple::Fuchsia; }
750
751 bool isOSDragonFly() const { return getOS() == Triple::DragonFly; }
752
753 bool isOSSolaris() const { return getOS() == Triple::Solaris; }
754
755 bool isOSIAMCU() const { return getOS() == Triple::ELFIAMCU; }
756
757 bool isOSUnknown() const { return getOS() == Triple::UnknownOS; }
758
759 bool isGNUEnvironment() const {
761 return Env == Triple::GNU || Env == Triple::GNUT64 ||
762 Env == Triple::GNUABIN32 || Env == Triple::GNUABI64 ||
763 Env == Triple::GNUEABI || Env == Triple::GNUEABIT64 ||
764 Env == Triple::GNUEABIHF || Env == Triple::GNUEABIHFT64 ||
765 Env == Triple::GNUF32 || Env == Triple::GNUF64 ||
766 Env == Triple::GNUSF || Env == Triple::GNUX32;
767 }
768
769 /// Tests whether the OS is Haiku.
770 bool isOSHaiku() const { return getOS() == Triple::Haiku; }
771
772 /// Tests whether the OS is UEFI.
773 bool isUEFI() const { return getOS() == Triple::UEFI; }
774
775 /// Tests whether the OS is Windows.
776 bool isOSWindows() const { return getOS() == Triple::Win32; }
777
778 /// Tests whether the OS is Windows or UEFI. These targets generally share
779 /// Windows low-level platform ABI conventions, but this does not imply
780 /// support for a hosted Windows environment or its runtime libraries. Use
781 /// object format or environment predicates when those properties matter.
782 bool isOSWindowsOrUEFI() const { return isOSWindows() || isUEFI(); }
783
784 /// Checks if the environment is MSVC.
786 return isOSWindows() && getEnvironment() == Triple::MSVC;
787 }
788
789 /// Checks if the environment could be MSVC.
794
795 // Checks if we're using the Windows Arm64EC ABI.
796 bool isWindowsArm64EC() const {
797 return getArch() == Triple::aarch64 &&
799 }
800
803 }
804
807 }
808
811 }
812
814 return isOSWindows() && getEnvironment() == Triple::GNU;
815 }
816
817 /// Tests for either Cygwin or MinGW OS
818 bool isOSCygMing() const {
820 }
821
822 /// Is this a "Windows" OS targeting a "MSVCRT.dll" environment.
827
828 /// Tests whether the OS is Linux.
829 bool isOSLinux() const { return getOS() == Triple::Linux; }
830
831 /// Tests whether the OS is kFreeBSD.
832 bool isOSKFreeBSD() const { return getOS() == Triple::KFreeBSD; }
833
834 /// Tests whether the OS is Hurd.
835 bool isOSHurd() const { return getOS() == Triple::Hurd; }
836
837 /// Tests whether the OS is WASI.
838 bool isOSWASI() const {
839 return getOS() == Triple::WASI || getOS() == Triple::WASIp1 ||
841 }
842
843 /// Tests whether the OS is Emscripten.
844 bool isOSEmscripten() const { return getOS() == Triple::Emscripten; }
845
846 /// Tests whether the OS uses glibc.
847 bool isOSGlibc() const {
848 return (getOS() == Triple::Linux || getOS() == Triple::KFreeBSD ||
849 getOS() == Triple::Hurd) &&
851 }
852
853 /// Tests whether the OS is AIX.
854 bool isOSAIX() const { return getOS() == Triple::AIX; }
855
856 bool isOSSerenity() const { return getOS() == Triple::Serenity; }
857
858 /// Tests whether the OS is QURT.
859 bool isOSQurt() const { return getOS() == Triple::QURT; }
860
861 /// Tests whether the OS is H2.
862 bool isOSH2() const { return getOS() == Triple::H2; }
863
864 /// Tests whether the OS uses the ELF binary format.
865 bool isOSBinFormatELF() const { return getObjectFormat() == Triple::ELF; }
866
867 /// Tests whether the OS uses the COFF binary format.
868 bool isOSBinFormatCOFF() const { return getObjectFormat() == Triple::COFF; }
869
870 /// Tests whether the OS uses the GOFF binary format.
871 bool isOSBinFormatGOFF() const { return getObjectFormat() == Triple::GOFF; }
872
873 /// Tests whether the environment is MachO.
875
876 /// Tests whether the OS uses the Wasm binary format.
877 bool isOSBinFormatWasm() const { return getObjectFormat() == Triple::Wasm; }
878
879 /// Tests whether the OS uses the XCOFF binary format.
881
882 /// Tests whether the OS uses the DXContainer binary format.
885 }
886
887 /// Tests whether the target uses WALI Wasm
888 bool isWALI() const {
889 return getArch() == Triple::wasm32 && isOSLinux() &&
891 }
892
893 /// Tests whether the target is the PS4 platform.
894 bool isPS4() const {
895 return getArch() == Triple::x86_64 && getVendor() == Triple::SCEI &&
896 getOS() == Triple::PS4;
897 }
898
899 /// Tests whether the target is the PS5 platform.
900 bool isPS5() const {
901 return getArch() == Triple::x86_64 && getVendor() == Triple::SCEI &&
902 getOS() == Triple::PS5;
903 }
904
905 /// Tests whether the target is the PS4 or PS5 platform.
906 bool isPS() const { return isPS4() || isPS5(); }
907
908 /// Tests whether the target is Android
909 bool isAndroid() const { return getEnvironment() == Triple::Android; }
910
911 bool isAndroidVersionLT(unsigned Major) const {
912 assert(isAndroid() && "Not an Android triple!");
913
915
916 // 64-bit targets did not exist before API level 21 (Lollipop).
917 if (isArch64Bit() && Version.getMajor() < 21)
918 return VersionTuple(21) < VersionTuple(Major);
919
920 return Version < VersionTuple(Major);
921 }
922
923 /// Tests whether the environment is musl-libc
936
937 /// Tests whether the target is OHOS
938 /// LiteOS default enviroment is also OHOS, but omited on triple.
939 bool isOHOSFamily() const { return isOpenHOS() || isOSLiteOS(); }
940
941 bool isOpenHOS() const { return getEnvironment() == Triple::OpenHOS; }
942
943 bool isOSLiteOS() const { return getOS() == Triple::LiteOS; }
944
945 /// Tests whether the target is DXIL.
946 bool isDXIL() const { return getArch() == Triple::dxil; }
947
948 bool isShaderModelOS() const { return getOS() == Triple::ShaderModel; }
949
950 bool isVulkanOS() const { return getOS() == Triple::Vulkan; }
951
952 bool isOSManagarm() const { return getOS() == Triple::Managarm; }
953
954 bool isOSFirmware() const { return getOS() == Triple::Firmware; }
955
958 return Env == Triple::Pixel || Env == Triple::Vertex ||
959 Env == Triple::Geometry || Env == Triple::Hull ||
960 Env == Triple::Domain || Env == Triple::Compute ||
961 Env == Triple::Library || Env == Triple::RayGeneration ||
962 Env == Triple::Intersection || Env == Triple::AnyHit ||
963 Env == Triple::ClosestHit || Env == Triple::Miss ||
964 Env == Triple::Callable || Env == Triple::Mesh ||
966 }
967
968 /// Tests whether the target is SPIR (32- or 64-bit).
969 bool isSPIR() const {
970 return getArch() == Triple::spir || getArch() == Triple::spir64;
971 }
972
973 /// Tests whether the target is SPIR-V (32/64-bit/Logical).
974 bool isSPIRV() const {
975 return getArch() == Triple::spirv32 || getArch() == Triple::spirv64 ||
977 }
978
979 // Tests whether the target is SPIR-V or SPIR.
980 bool isSPIROrSPIRV() const { return isSPIR() || isSPIRV(); }
981
982 /// Tests whether the target is SPIR-V Logical
983 bool isSPIRVLogical() const { return getArch() == Triple::spirv; }
984
985 /// Tests whether the target is NVPTX (32- or 64-bit).
986 bool isNVPTX() const {
987 return getArch() == Triple::nvptx || getArch() == Triple::nvptx64;
988 }
989
990 /// Tests whether the target is AMDGCN
991 bool isAMDGCN() const { return getArch() == Triple::amdgpu; }
992
993 bool isAMDGPU() const { return isAMDGCN() || getArch() == Triple::r600; }
994
995 /// Tests whether the target is Thumb (little and big endian).
996 bool isThumb() const {
997 return getArch() == Triple::thumb || getArch() == Triple::thumbeb;
998 }
999
1000 /// Tests whether the target is ARM (little and big endian).
1001 bool isARM() const {
1002 return getArch() == Triple::arm || getArch() == Triple::armeb;
1003 }
1004
1005 /// Tests whether the target is LFI.
1006 bool isLFI() const {
1007 return (getArch() == Triple::aarch64 &&
1009 (getArch() == Triple::x86_64 &&
1011 }
1012
1013 /// Tests whether the target supports the EHABI exception
1014 /// handling standard.
1029
1030 // ARM EABI is the bare-metal EABI described in ARM ABI documents and
1031 // can be accessed via -target arm-none-eabi. This is NOT GNUEABI.
1032 // FIXME: Add a flag for bare-metal for that target and set Triple::EABI
1033 // even for GNUEABI, so we can make a distinction here and still conform to
1034 // the EABI on GNU (and Android) mode. This requires change in Clang, too.
1035 // FIXME: The Darwin exception is temporary, while we move users to
1036 // "*-*-*-macho" triples as quickly as possible.
1037 bool isTargetAEABI() const {
1038 return (getEnvironment() == Triple::EABI ||
1040 !isOSDarwin() && !isOSWindows();
1041 }
1042
1050
1051 bool isTargetMuslAEABI() const {
1052 return (getEnvironment() == Triple::MuslEABI ||
1055 !isOSDarwin() && !isOSWindows();
1056 }
1057
1058 /// Tests whether the target is T32.
1059 bool isArmT32() const {
1060 switch (getSubArch()) {
1072 return false;
1073 default:
1074 return true;
1075 }
1076 }
1077
1078 /// Tests whether the target is an M-class.
1079 bool isArmMClass() const {
1080 switch (getSubArch()) {
1087 return true;
1088 default:
1089 return false;
1090 }
1091 }
1092
1093 /// Tests whether the target is AArch64 (little and big endian).
1094 bool isAArch64() const {
1095 return getArch() == Triple::aarch64 || getArch() == Triple::aarch64_be ||
1097 }
1098
1099 /// Tests whether the target is AArch64 and pointers are the size specified by
1100 /// \p PointerWidth.
1101 bool isAArch64(int PointerWidth) const {
1102 assert(PointerWidth == 64 || PointerWidth == 32);
1103 if (!isAArch64())
1104 return false;
1105 return getArch() == Triple::aarch64_32 ||
1107 ? PointerWidth == 32
1108 : PointerWidth == 64;
1109 }
1110
1111 bool isAVR() const { return getArch() == Triple::avr; }
1112
1113 /// Tests whether the target is 32-bit LoongArch.
1114 bool isLoongArch32() const { return getArch() == Triple::loongarch32; }
1115
1116 /// Tests whether the target is 64-bit LoongArch.
1117 bool isLoongArch64() const { return getArch() == Triple::loongarch64; }
1118
1119 /// Tests whether the target is LoongArch (32- and 64-bit).
1120 bool isLoongArch() const { return isLoongArch32() || isLoongArch64(); }
1121
1122 /// Tests whether the target is MIPS 32-bit (little and big endian).
1123 bool isMIPS32() const {
1124 return getArch() == Triple::mips || getArch() == Triple::mipsel;
1125 }
1126
1127 /// Tests whether the target is MIPS 64-bit (little and big endian).
1128 bool isMIPS64() const {
1129 return getArch() == Triple::mips64 || getArch() == Triple::mips64el;
1130 }
1131
1132 /// Tests whether the target is MIPS (little and big endian, 32- or 64-bit).
1133 bool isMIPS() const { return isMIPS32() || isMIPS64(); }
1134
1135 /// Tests whether the target is PowerPC (32- or 64-bit LE or BE).
1136 bool isPPC() const {
1137 return getArch() == Triple::ppc || getArch() == Triple::ppc64 ||
1139 }
1140
1141 /// Tests whether the target is 32-bit PowerPC (little and big endian).
1142 bool isPPC32() const {
1143 return getArch() == Triple::ppc || getArch() == Triple::ppcle;
1144 }
1145
1146 /// Tests whether the target is 64-bit PowerPC (little and big endian).
1147 bool isPPC64() const {
1148 return getArch() == Triple::ppc64 || getArch() == Triple::ppc64le;
1149 }
1150
1151 /// Tests whether the target 64-bit PowerPC big endian ABI is ELFv2.
1152 bool isPPC64ELFv2ABI() const {
1153 return (getArch() == Triple::ppc64 &&
1154 ((getOS() == Triple::FreeBSD &&
1155 (getOSMajorVersion() >= 13 || getOSVersion().empty())) ||
1156 getOS() == Triple::OpenBSD || isMusl()));
1157 }
1158
1159 /// Tests whether the target 32-bit PowerPC uses Secure PLT.
1160 bool isPPC32SecurePlt() const {
1161 return ((getArch() == Triple::ppc || getArch() == Triple::ppcle) &&
1162 ((getOS() == Triple::FreeBSD &&
1163 (getOSMajorVersion() >= 13 || getOSVersion().empty())) ||
1165 isMusl()));
1166 }
1167
1168 /// Tests whether the target is 32-bit RISC-V.
1169 bool isRISCV32() const {
1171 }
1172
1173 /// Tests whether the target is 64-bit RISC-V.
1174 bool isRISCV64() const {
1176 }
1177
1178 /// Tests whether the target is RISC-V (32- and 64-bit).
1179 bool isRISCV() const { return isRISCV32() || isRISCV64(); }
1180
1181 /// Tests whether the target is 32-bit SPARC (little and big endian).
1182 bool isSPARC32() const {
1183 return getArch() == Triple::sparc || getArch() == Triple::sparcel;
1184 }
1185
1186 /// Tests whether the target is 64-bit SPARC (big endian).
1187 bool isSPARC64() const { return getArch() == Triple::sparcv9; }
1188
1189 /// Tests whether the target is SPARC.
1190 bool isSPARC() const { return isSPARC32() || isSPARC64(); }
1191
1192 /// Tests whether the target is SystemZ.
1193 bool isSystemZ() const { return getArch() == Triple::systemz; }
1194
1195 /// Tests whether the target is x86 (32- or 64-bit).
1196 bool isX86() const {
1197 return getArch() == Triple::x86 || getArch() == Triple::x86_64;
1198 }
1199
1200 /// Tests whether the target is x86 (32-bit).
1201 bool isX86_32() const { return getArch() == Triple::x86; }
1202
1203 /// Tests whether the target is x86 (64-bit).
1204 bool isX86_64() const { return getArch() == Triple::x86_64; }
1205
1206 /// Tests whether the target is VE
1207 bool isVE() const { return getArch() == Triple::ve; }
1208
1209 /// Tests whether the target is wasm (32- and 64-bit).
1210 bool isWasm() const {
1211 return getArch() == Triple::wasm32 || getArch() == Triple::wasm64;
1212 }
1213
1214 // Tests whether the target is CSKY
1215 bool isCSKY() const { return getArch() == Triple::csky; }
1216
1217 /// Tests whether the target is the Apple "arm64e" AArch64 subarch.
1218 bool isArm64e() const {
1219 return getArch() == Triple::aarch64 &&
1221 }
1222
1223 // Tests whether the target is N32.
1224 bool isABIN32() const {
1226 return Env == Triple::GNUABIN32 || Env == Triple::MuslABIN32;
1227 }
1228
1229 /// Tests whether the target is X32.
1230 bool isX32() const {
1232 return Env == Triple::GNUX32 || Env == Triple::MuslX32;
1233 }
1234
1235 /// Tests whether the target is eBPF.
1236 bool isBPF() const {
1237 return getArch() == Triple::bpfel || getArch() == Triple::bpfeb;
1238 }
1239
1240 /// Tests whether MSVC linker or UEFI targets.
1241 /// Used to default to -mincremental-linker-compatible if we are
1242 /// targeting the MSVC linker or *-uefi triples.
1246
1247 /// Tests if the target forces 64-bit time_t on a 32-bit architecture.
1248 bool isTime64ABI() const {
1250 return Env == Triple::GNUT64 || Env == Triple::GNUEABIT64 ||
1251 Env == Triple::GNUEABIHFT64;
1252 }
1253
1254 /// Returns the default floating-point ABI for this target triple, i.e. the
1255 /// ABI the code generator will resolve FloatABI::Default to
1257
1258 /// Tests if the target's default floating-point ABI is hard float.
1260
1261 /// Returns the default floating-point format for the "long double" type. A
1262 /// particular module may override this default.
1264
1265 /// Tests whether the target supports comdat
1266 bool supportsCOMDAT() const {
1267 return !(isOSBinFormatMachO() || isOSBinFormatXCOFF() ||
1269 }
1270
1271 /// Tests whether the target uses emulated TLS as default.
1272 ///
1273 /// Note: Android API level 29 (10) introduced ELF TLS.
1275 return (isAndroid() && isAndroidVersionLT(29)) || isOSOpenBSD() ||
1277 }
1278
1279 /// True if the target uses TLSDESC by default.
1280 bool hasDefaultTLSDESC() const {
1281 return isAArch64() || (isAndroid() && isRISCV64()) || isOSFuchsia();
1282 }
1283
1284 /// Tests whether the target uses -data-sections as default.
1286 return isOSBinFormatXCOFF() || isWasm();
1287 }
1288
1289 /// Returns the default wchar_t size (in bytes) for this target triple.
1290 LLVM_ABI unsigned getDefaultWCharSize() const;
1291
1292 /// Tests if the environment supports dllimport/export annotations.
1293 bool hasDLLImportExport() const { return isOSWindows() || isPS(); }
1294
1295 /// @}
1296 /// @name Mutators
1297 /// @{
1298
1299 /// Set the architecture (first) component of the triple to a known type.
1300 LLVM_ABI void setArch(ArchType Kind, SubArchType SubArch = NoSubArch);
1301
1302 /// Set the vendor (second) component of the triple to a known type.
1303 LLVM_ABI void setVendor(VendorType Kind);
1304
1305 /// Set the operating system (third) component of the triple to a known type.
1306 LLVM_ABI void setOS(OSType Kind);
1307
1308 /// Set the environment (fourth) component of the triple to a known type.
1309 LLVM_ABI void setEnvironment(EnvironmentType Kind);
1310
1311 /// Set the object file format.
1312 LLVM_ABI void setObjectFormat(ObjectFormatType Kind);
1313
1314 /// Set all components to the new triple \p Str.
1315 LLVM_ABI void setTriple(const Twine &Str);
1316
1317 /// Set the architecture (first) component of the triple by name.
1318 LLVM_ABI void setArchName(StringRef Str);
1319
1320 /// Set the vendor (second) component of the triple by name.
1322
1323 /// Set the operating system (third) component of the triple by name.
1324 LLVM_ABI void setOSName(StringRef Str);
1325
1326 /// Set the optional environment (fourth) component of the triple by name.
1328
1329 /// Set the operating system and optional environment components with a single
1330 /// string.
1332
1333 /// @}
1334 /// @name Helpers to build variants of a particular triple.
1335 /// @{
1336
1337 /// Form a triple with a 32-bit variant of the current architecture.
1338 ///
1339 /// This can be used to move across "families" of architectures where useful.
1340 ///
1341 /// \returns A new triple with a 32-bit architecture or an unknown
1342 /// architecture if no such variant can be found.
1344
1345 /// Form a triple with a 64-bit variant of the current architecture.
1346 ///
1347 /// This can be used to move across "families" of architectures where useful.
1348 ///
1349 /// \returns A new triple with a 64-bit architecture or an unknown
1350 /// architecture if no such variant can be found.
1352
1353 /// Form a triple with a big endian variant of the current architecture.
1354 ///
1355 /// This can be used to move across "families" of architectures where useful.
1356 ///
1357 /// \returns A new triple with a big endian architecture or an unknown
1358 /// architecture if no such variant can be found.
1360
1361 /// Form a triple with a little endian variant of the current architecture.
1362 ///
1363 /// This can be used to move across "families" of architectures where useful.
1364 ///
1365 /// \returns A new triple with a little endian architecture or an unknown
1366 /// architecture if no such variant can be found.
1368
1369 /// Tests whether the target triple is little endian.
1370 ///
1371 /// \returns true if the triple is little endian, false otherwise.
1372 LLVM_ABI bool isLittleEndian() const;
1373
1374 /// Test whether target triples are compatible.
1375 LLVM_ABI bool isCompatibleWith(const Triple &Other) const;
1376
1377 /// Test whether the target triple is for a GPU.
1378 bool isGPU() const { return isSPIROrSPIRV() || isNVPTX() || isAMDGPU(); }
1379
1380 /// Merge target triples.
1381 LLVM_ABI std::string merge(const Triple &Other) const;
1382
1383 /// Some platforms have different minimum supported OS versions that
1384 /// varies by the architecture specified in the triple. This function
1385 /// returns the minimum supported OS version for this triple if one an exists,
1386 /// or an invalid version tuple if this triple doesn't have one.
1388
1389 /// @}
1390 /// @name Static helpers for IDs.
1391 /// @{
1392
1393 /// Get the canonical name for the \p Kind architecture.
1394 LLVM_ABI static StringRef getArchTypeName(ArchType Kind);
1395
1396 /// Get the architecture name based on \p Kind and \p SubArch.
1397 LLVM_ABI static StringRef getArchName(ArchType Kind,
1398 SubArchType SubArch = NoSubArch);
1399
1400 /// Get the "prefix" canonical name for the \p Kind architecture. This is the
1401 /// prefix used by the architecture specific builtins, and is suitable for
1402 /// passing to \see Intrinsic::getIntrinsicForClangBuiltin().
1403 ///
1404 /// \return - The architecture prefix, or 0 if none is defined.
1405 LLVM_ABI static StringRef getArchTypePrefix(ArchType Kind);
1406
1407 /// Get the canonical name for the \p Kind vendor.
1408 LLVM_ABI static StringRef getVendorTypeName(VendorType Kind);
1409
1410 /// Get the canonical name for the \p Kind operating system.
1411 LLVM_ABI static StringRef getOSTypeName(OSType Kind);
1412
1413 /// Get the canonical name for the \p Kind environment.
1414 LLVM_ABI static StringRef getEnvironmentTypeName(EnvironmentType Kind);
1415
1416 /// Get the name for the \p Object format.
1417 LLVM_ABI static StringRef
1418 getObjectFormatTypeName(ObjectFormatType ObjectFormat);
1419
1420 /// @}
1421 /// @name Static helpers for converting alternate architecture names.
1422 /// @{
1423
1424 /// The canonical type for the given LLVM architecture name (e.g., "x86").
1425 LLVM_ABI static ArchType getArchTypeForLLVMName(StringRef Str);
1426
1427 /// Parse anything recognized as an architecture for the first field of the
1428 /// triple.
1429 LLVM_ABI static ArchType parseArch(StringRef Str);
1430
1431 /// Parse the subarchitecture encoded in the first (architecture) field of the
1432 /// triple (e.g. "amdgpu9.00" -> AMDGPUSubArch900). Returns NoSubArch if the
1433 /// string does not encode a recognized subarchitecture.
1434 LLVM_ABI static SubArchType parseSubArch(StringRef Str);
1435
1436 /// @}
1437
1438 /// Returns a canonicalized OS version number for the specified OS.
1439 LLVM_ABI static VersionTuple
1440 getCanonicalVersionForOS(OSType OSKind, const VersionTuple &Version,
1441 bool IsInValidRange);
1442
1443 /// Returns whether an OS version is invalid and would not map to an Apple OS.
1444 LLVM_ABI static bool isValidVersionForOS(OSType OSKind,
1445 const VersionTuple &Version);
1446
1448
1449 /// Compute the LLVM IR data layout string based on the triple. Some targets
1450 /// customize the layout based on the ABIName string.
1451 LLVM_ABI std::string computeDataLayout(StringRef ABIName = "") const;
1452};
1453
1454} // namespace llvm
1455
1456#endif
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
#define LLVM_ABI
Definition Compiler.h:215
Defines the llvm::VersionTuple class, which represents a version in the form major[....
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
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 ...
Definition Triple.cpp:2325
LLVM_ABI VersionTuple getOSVersion() const
Parse the version number from the OS name component of the triple, if present.
Definition Triple.cpp:1476
bool isPPC() const
Tests whether the target is PowerPC (32- or 64-bit LE or BE).
Definition Triple.h:1136
bool isOSDragonFly() const
Definition Triple.h:751
LLVM_ABI StringRef getVendorName() const
Get the vendor (second) component of the triple.
Definition Triple.cpp:1421
LLVM_ABI VersionTuple getWatchOSVersion() const
Parse the version number as with getOSVersion.
Definition Triple.cpp:1596
LLVM_ABI void setArchName(StringRef Str)
Set the architecture (first) component of the triple by name.
Definition Triple.cpp:1704
bool isTargetMachineMac() const
Returns true for targets that run on a macOS machine.
Definition Triple.h:738
bool isArmT32() const
Tests whether the target is T32.
Definition Triple.h:1059
LLVM_ABI void setObjectFormat(ObjectFormatType Kind)
Set the object file format.
Definition Triple.cpp:1695
bool isAndroidVersionLT(unsigned Major) const
Definition Triple.h:911
LLVM_ABI llvm::Triple get32BitArchVariant() const
Form a triple with a 32-bit variant of the current architecture.
Definition Triple.cpp:1835
bool isOSCygMing() const
Tests for either Cygwin or MinGW OS.
Definition Triple.h:818
bool isWatchABI() const
Definition Triple.h:697
Triple()=default
Default constructor is the same as an empty string and leaves all triple fields unknown.
@ RayGeneration
Definition Triple.h:403
@ LastEnvironmentType
Definition Triple.h:417
@ UnknownEnvironment
Definition Triple.h:355
@ RootSignature
Definition Triple.h:411
@ Amplification
Definition Triple.h:410
bool isThumb() const
Tests whether the target is Thumb (little and big endian).
Definition Triple.h:996
bool isPS4() const
Tests whether the target is the PS4 platform.
Definition Triple.h:894
bool isX86_64() const
Tests whether the target is x86 (64-bit).
Definition Triple.h:1204
bool isPPC64ELFv2ABI() const
Tests whether the target 64-bit PowerPC big endian ABI is ELFv2.
Definition Triple.h:1152
static LLVM_ABI VersionTuple getCanonicalVersionForOS(OSType OSKind, const VersionTuple &Version, bool IsInValidRange)
Returns a canonicalized OS version number for the specified OS.
Definition Triple.cpp:2379
bool isOSWASI() const
Tests whether the OS is WASI.
Definition Triple.h:838
bool isSPIR() const
Tests whether the target is SPIR (32- or 64-bit).
Definition Triple.h:969
CanonicalForm
Canonical form.
Definition Triple.h:488
bool isOSBinFormatWasm() const
Tests whether the OS uses the Wasm binary format.
Definition Triple.h:877
bool isOSQurt() const
Tests whether the OS is QURT.
Definition Triple.h:859
LLVM_ABI bool operator<(const Triple &Other) const
Definition Triple.cpp:32
bool isDriverKit() const
Is this an Apple DriverKit triple.
Definition Triple.h:706
unsigned getArchPointerBitWidth() const
Returns the pointer width of this architecture.
Definition Triple.h:616
LLVM_ABI llvm::Triple getLittleEndianArchVariant() const
Form a triple with a little endian variant of the current architecture.
Definition Triple.cpp:2152
bool isOSHurd() const
Tests whether the OS is Hurd.
Definition Triple.h:835
bool isHardFloatABI() const
Tests if the target's default floating-point ABI is hard float.
Definition Triple.h:1259
bool isBPF() const
Tests whether the target is eBPF.
Definition Triple.h:1236
bool isX32() const
Tests whether the target is X32.
Definition Triple.h:1230
static LLVM_ABI StringRef getVendorTypeName(VendorType Kind)
Get the canonical name for the Kind vendor.
Definition Triple.cpp:378
Triple(const char *Str)
Definition Triple.h:463
ObjectFormatType getObjectFormat() const
Get the object format for this triple.
Definition Triple.h:537
bool isAArch64(int PointerWidth) const
Tests whether the target is AArch64 and pointers are the size specified by PointerWidth.
Definition Triple.h:1101
SubArchType getSubArch() const
get the parsed subarchitecture type for this triple.
Definition Triple.h:516
bool isX86() const
Tests whether the target is x86 (32- or 64-bit).
Definition Triple.h:1196
bool isArm64e() const
Tests whether the target is the Apple "arm64e" AArch64 subarch.
Definition Triple.h:1218
std::string normalize(CanonicalForm Form=CanonicalForm::ANY) const
Return the normalized form of this triple's string.
Definition Triple.h:504
bool isTargetEHABICompatible() const
Tests whether the target supports the EHABI exception handling standard.
Definition Triple.h:1015
bool isOSBinFormatGOFF() const
Tests whether the OS uses the GOFF binary format.
Definition Triple.h:871
bool isWindowsGNUEnvironment() const
Definition Triple.h:813
LLVM_ABI void setVendorName(StringRef Str)
Set the vendor (second) component of the triple by name.
Definition Triple.cpp:1708
bool isOSNetBSD() const
Definition Triple.h:743
LLVM_ABI std::string computeDataLayout(StringRef ABIName="") const
Compute the LLVM IR data layout string based on the triple.
LLVM_ABI void setOSAndEnvironmentName(StringRef Str)
Set the operating system and optional environment components with a single string.
Definition Triple.cpp:1725
bool isAndroid() const
Tests whether the target is Android.
Definition Triple.h:909
bool hasDefaultTLSDESC() const
True if the target uses TLSDESC by default.
Definition Triple.h:1280
bool isLFI() const
Tests whether the target is LFI.
Definition Triple.h:1006
LLVM_ABI llvm::Triple get64BitArchVariant() const
Form a triple with a 64-bit variant of the current architecture.
Definition Triple.cpp:1949
bool isOSMSVCRT() const
Is this a "Windows" OS targeting a "MSVCRT.dll" environment.
Definition Triple.h:823
bool isOSBinFormatMachO() const
Tests whether the environment is MachO.
Definition Triple.h:874
LLVM_ABI bool isLittleEndian() const
Tests whether the target triple is little endian.
Definition Triple.cpp:2207
LLVM_ABI void setEnvironment(EnvironmentType Kind)
Set the environment (fourth) component of the triple to a known type.
Definition Triple.cpp:1686
bool isABIN32() const
Definition Triple.h:1224
LLVM_ABI StringRef getOSName() const
Get the operating system (third) component of the triple.
Definition Triple.cpp:1426
bool isAVR() const
Definition Triple.h:1111
bool supportsCOMDAT() const
Tests whether the target supports comdat.
Definition Triple.h:1266
bool isWindowsCoreCLREnvironment() const
Definition Triple.h:801
bool isSPIROrSPIRV() const
Definition Triple.h:980
LLVM_ABI ExceptionHandling getDefaultExceptionHandling() const
Definition Triple.cpp:2467
bool isMIPS64() const
Tests whether the target is MIPS 64-bit (little and big endian).
Definition Triple.h:1128
@ loongarch32
Definition Triple.h:65
@ renderscript64
Definition Triple.h:116
@ UnknownArch
Definition Triple.h:51
@ loongarch64
Definition Triple.h:66
@ renderscript32
Definition Triple.h:115
bool hasDefaultDataSections() const
Tests whether the target uses -data-sections as default.
Definition Triple.h:1285
bool isTargetGNUAEABI() const
Definition Triple.h:1043
bool isOSSolaris() const
Definition Triple.h:753
bool isOSH2() const
Tests whether the OS is H2.
Definition Triple.h:862
bool isRISCV32() const
Tests whether the target is 32-bit RISC-V.
Definition Triple.h:1169
bool isOSKFreeBSD() const
Tests whether the OS is kFreeBSD.
Definition Triple.h:832
LLVM_ABI void setTriple(const Twine &Str)
Set all components to the new triple Str.
Definition Triple.cpp:1674
OSType getOS() const
Get the parsed operating system type of this triple.
Definition Triple.h:522
LLVM_ABI VersionTuple getEnvironmentVersion() const
Parse the version number from the OS name component of the triple, if present.
Definition Triple.cpp:1449
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...
Definition Triple.cpp:1186
static LLVM_ABI ArchType getArchTypeForLLVMName(StringRef Str)
The canonical type for the given LLVM architecture name (e.g., "x86").
Definition Triple.cpp:456
bool isOSVersionLT(const Triple &Other) const
Definition Triple.h:660
bool isPPC32() const
Tests whether the target is 32-bit PowerPC (little and big endian).
Definition Triple.h:1142
ArchType getArch() const
Get the parsed architecture type of this triple.
Definition Triple.h:513
LLVM_ABI bool operator==(const Triple &Other) const
Definition Triple.cpp:26
LLVM_ABI unsigned getTrampolineSize() const
Returns the trampoline size in bytes for this configuration.
Definition Triple.cpp:1805
bool isOSBinFormatCOFF() const
Tests whether the OS uses the COFF binary format.
Definition Triple.h:868
bool isRISCV64() const
Tests whether the target is 64-bit RISC-V.
Definition Triple.h:1174
bool isCSKY() const
Definition Triple.h:1215
bool isLoongArch64() const
Tests whether the target is 64-bit LoongArch.
Definition Triple.h:1117
LLVM_ABI StringRef getEnvironmentName() const
Get the optional environment (fourth) component of the triple, or "" if empty.
Definition Triple.cpp:1432
bool isSPARC32() const
Tests whether the target is 32-bit SPARC (little and big endian).
Definition Triple.h:1182
bool isSimulatorEnvironment() const
Definition Triple.h:729
LLVM_ABI VersionTuple getDXILVersion() const
Parse the DXIL version number from the OSVersion and DXIL version (SubArch).
Definition Triple.cpp:1661
const std::string & str() const
Definition Triple.h:578
bool isOSzOS() const
Definition Triple.h:708
bool isOSSerenity() const
Definition Triple.h:856
bool isOHOSFamily() const
Tests whether the target is OHOS LiteOS default enviroment is also OHOS, but omited on triple.
Definition Triple.h:939
EnvironmentType getEnvironment() const
Get the parsed environment type of this triple.
Definition Triple.h:528
bool isOSOpenBSD() const
Definition Triple.h:745
LLVM_ABI VersionTuple getVulkanVersion() const
Parse the Vulkan version number from the OSVersion and SPIR-V version (SubArch).
Definition Triple.cpp:1636
bool isOSUnknown() const
Definition Triple.h:757
LLVM_ABI VersionTuple getDriverKitVersion() const
Parse the version number as with getOSVersion.
Definition Triple.cpp:1624
static LLVM_ABI ArchType parseArch(StringRef Str)
Parse anything recognized as an architecture for the first field of the triple.
Definition Triple.cpp:595
bool isMIPS32() const
Tests whether the target is MIPS 32-bit (little and big endian).
Definition Triple.h:1123
bool isShaderModelOS() const
Definition Triple.h:948
bool isUEFI() const
Tests whether the OS is UEFI.
Definition Triple.h:773
bool isOSWindows() const
Tests whether the OS is Windows.
Definition Triple.h:776
bool isOSFirmware() const
Definition Triple.h:954
bool isMusl() const
Tests whether the environment is musl-libc.
Definition Triple.h:924
const std::string & getTriple() const
Definition Triple.h:580
LLVM_ABI LongDoubleFormat getDefaultLongDoubleFormat() const
Returns the default floating-point format for the "long double" type.
Definition Triple.cpp:2542
bool isOSWindowsOrUEFI() const
Tests whether the OS is Windows or UEFI.
Definition Triple.h:782
static LLVM_ABI StringRef getArchTypeName(ArchType Kind)
Get the canonical name for the Kind architecture.
Definition Triple.cpp:38
bool isOSVersionGE(const Triple &Other) const
Definition Triple.h:664
bool isOSBinFormatDXContainer() const
Tests whether the OS uses the DXContainer binary format.
Definition Triple.h:883
bool isGPU() const
Test whether the target triple is for a GPU.
Definition Triple.h:1378
bool isOSBinFormatXCOFF() const
Tests whether the OS uses the XCOFF binary format.
Definition Triple.h:880
static LLVM_ABI StringRef getOSTypeName(OSType Kind)
Get the canonical name for the Kind operating system.
Definition Triple.cpp:391
bool isTargetMuslAEABI() const
Definition Triple.h:1051
@ UnknownObjectFormat
Definition Triple.h:420
bool isARM() const
Tests whether the target is ARM (little and big endian).
Definition Triple.h:1001
LLVM_ABI std::string merge(const Triple &Other) const
Merge target triples.
Definition Triple.cpp:2313
bool isArmMClass() const
Tests whether the target is an M-class.
Definition Triple.h:1079
bool isOSLinux() const
Tests whether the OS is Linux.
Definition Triple.h:829
static LLVM_ABI SubArchType parseSubArch(StringRef Str)
Parse the subarchitecture encoded in the first (architecture) field of the triple (e....
Definition Triple.cpp:733
bool isBridgeOS() const
Is this an Apple BridgeOS triple.
Definition Triple.h:703
bool isOSManagarm() const
Definition Triple.h:952
bool isRISCV() const
Tests whether the target is RISC-V (32- and 64-bit).
Definition Triple.h:1179
bool isAMDGCN() const
Tests whether the target is AMDGCN.
Definition Triple.h:991
bool isAMDGPU() const
Definition Triple.h:993
bool isLoongArch32() const
Tests whether the target is 32-bit LoongArch.
Definition Triple.h:1114
bool isOSLiteOS() const
Definition Triple.h:943
@ UnknownVendor
Definition Triple.h:281
@ ImaginationTechnologies
Definition Triple.h:288
@ LastVendorType
Definition Triple.h:298
@ MipsTechnologies
Definition Triple.h:289
bool isNVPTX() const
Tests whether the target is NVPTX (32- or 64-bit).
Definition Triple.h:986
bool isOSAIX() const
Tests whether the OS is AIX.
Definition Triple.h:854
LLVM_ABI VersionTuple getMinimumSupportedOSVersion() const
Some platforms have different minimum supported OS versions that varies by the architecture specified...
Definition Triple.cpp:2342
LLVM_ABI bool isArch64Bit() const
Test whether the architecture is 64-bit.
Definition Triple.cpp:1823
LLVM_ABI StringRef getOSAndEnvironmentName() const
Get the operating system and optional environment components as a single string (separated by a '-' i...
Definition Triple.cpp:1438
@ ARMSubArch_v6t2
Definition Triple.h:154
@ AMDGPUSubArch600
Definition Triple.h:197
@ MipsSubArch_r6
Definition Triple.h:169
@ X86_64SubArch_lfi
Definition Triple.h:163
@ DXILSubArch_v1_2
Definition Triple.h:185
@ ARMSubArch_v7
Definition Triple.h:145
@ ARMSubArch_v8m_mainline
Definition Triple.h:143
@ AMDGPUSubArch1153
Definition Triple.h:258
@ ARMSubArch_v9_6a
Definition Triple.h:124
@ AMDGPUSubArch1012
Definition Triple.h:238
@ ARMSubArch_v8r
Definition Triple.h:141
@ AMDGPUSubArch1150
Definition Triple.h:255
@ ARMSubArch_v9_1a
Definition Triple.h:129
@ AMDGPUSubArch1250S
Definition Triple.h:271
@ DXILSubArch_v1_1
Definition Triple.h:184
@ AMDGPUSubArch703
Definition Triple.h:205
@ AMDGPUSubArch1201
Definition Triple.h:268
@ LatestDXILSubArch
Definition Triple.h:193
@ FirstAMDGPUSubArch
Definition Triple.h:277
@ SPIRVSubArch_v10
Definition Triple.h:174
@ AMDGPUSubArch9
Definition Triple.h:218
@ SPIRVSubArch_v13
Definition Triple.h:177
@ AMDGPUSubArch1172
Definition Triple.h:264
@ AMDGPUSubArch1035
Definition Triple.h:247
@ ARMSubArch_v7k
Definition Triple.h:149
@ AMDGPUSubArch9_4
Definition Triple.h:231
@ AMDGPUSubArch6
Definition Triple.h:196
@ AMDGPUSubArch1033
Definition Triple.h:245
@ AMDGPUSubArch1103
Definition Triple.h:254
@ ARMSubArch_v8_7a
Definition Triple.h:133
@ AMDGPUSubArch1034
Definition Triple.h:246
@ AMDGPUSubArch1154
Definition Triple.h:259
@ ARMSubArch_v8
Definition Triple.h:140
@ SPIRVSubArch_v16
Definition Triple.h:180
@ ARMSubArch_v8_1a
Definition Triple.h:139
@ ARMSubArch_v9_2a
Definition Triple.h:128
@ AMDGPUSubArch1200
Definition Triple.h:267
@ AMDGPUSubArch10_3
Definition Triple.h:241
@ DXILSubArch_v1_3
Definition Triple.h:186
@ SPIRVSubArch_v15
Definition Triple.h:179
@ ARMSubArch_v7m
Definition Triple.h:147
@ AMDGPUSubArch1102
Definition Triple.h:253
@ ARMSubArch_v9_7a
Definition Triple.h:123
@ AMDGPUSubArch1013
Definition Triple.h:239
@ AMDGPUSubArch902
Definition Triple.h:220
@ ARMSubArch_v6k
Definition Triple.h:153
@ AMDGPUSubArch1010
Definition Triple.h:236
@ AMDGPUSubArch90A
Definition Triple.h:229
@ ARMSubArch_v5
Definition Triple.h:155
@ AMDGPUSubArch1170
Definition Triple.h:262
@ AArch64SubArch_arm64e
Definition Triple.h:159
@ AMDGPUSubArch810
Definition Triple.h:216
@ ARMSubArch_v6
Definition Triple.h:151
@ AMDGPUSubArch11
Definition Triple.h:250
@ AMDGPUSubArch1151
Definition Triple.h:256
@ ARMSubArch_v9_5a
Definition Triple.h:125
@ AMDGPUSubArch602
Definition Triple.h:199
@ ARMSubArch_v7ve
Definition Triple.h:150
@ ARMSubArch_v8m_baseline
Definition Triple.h:142
@ ARMSubArch_v8_8a
Definition Triple.h:132
@ AMDGPUSubArch942
Definition Triple.h:232
@ AMDGPUSubArch7
Definition Triple.h:201
@ AMDGPUSubArch702
Definition Triple.h:204
@ AMDGPUSubArch950
Definition Triple.h:233
@ ARMSubArch_v8_2a
Definition Triple.h:138
@ LastAMDGPUSubArch
Definition Triple.h:278
@ ARMSubArch_v7s
Definition Triple.h:148
@ AMDGPUSubArch1251
Definition Triple.h:273
@ AMDGPUSubArch805
Definition Triple.h:213
@ DXILSubArch_v1_0
Definition Triple.h:183
@ DXILSubArch_v1_7
Definition Triple.h:190
@ AMDGPUSubArch12_5
Definition Triple.h:270
@ KalimbaSubArch_v3
Definition Triple.h:165
@ DXILSubArch_v1_5
Definition Triple.h:188
@ AMDGPUSubArch1250
Definition Triple.h:272
@ AMDGPUSubArch1030
Definition Triple.h:242
@ ARMSubArch_v8_4a
Definition Triple.h:136
@ AMDGPUSubArch803
Definition Triple.h:212
@ AMDGPUSubArch601
Definition Triple.h:198
@ ARMSubArch_v8_9a
Definition Triple.h:131
@ AMDGPUSubArch10_1
Definition Triple.h:235
@ AMDGPUSubArch904
Definition Triple.h:221
@ AMDGPUSubArch11_7
Definition Triple.h:261
@ AMDGPUSubArch705
Definition Triple.h:207
@ AMDGPUSubArch802
Definition Triple.h:211
@ AMDGPUSubArch8
Definition Triple.h:209
@ ARMSubArch_v7em
Definition Triple.h:146
@ SPIRVSubArch_v12
Definition Triple.h:176
@ AMDGPUSubArch90C
Definition Triple.h:224
@ SPIRVSubArch_v14
Definition Triple.h:178
@ AMDGPUSubArch1100
Definition Triple.h:251
@ KalimbaSubArch_v4
Definition Triple.h:166
@ AMDGPUSubArch909
Definition Triple.h:223
@ ARMSubArch_v8_1m_mainline
Definition Triple.h:144
@ AMDGPUSubArch1036
Definition Triple.h:248
@ ARMSubArch_v8_3a
Definition Triple.h:137
@ AArch64SubArch_arm64ec
Definition Triple.h:160
@ ARMSubArch_v8_6a
Definition Triple.h:134
@ ARMSubArch_v5te
Definition Triple.h:156
@ KalimbaSubArch_v5
Definition Triple.h:167
@ AMDGPUSubArch701
Definition Triple.h:203
@ ARMSubArch_v4t
Definition Triple.h:157
@ AMDGPUSubArch1171
Definition Triple.h:263
@ DXILSubArch_v1_6
Definition Triple.h:189
@ AMDGPUSubArch1011
Definition Triple.h:237
@ AMDGPUSubArch906
Definition Triple.h:222
@ AMDGPUSubArch900
Definition Triple.h:219
@ AMDGPUSubArch1152
Definition Triple.h:257
@ DXILSubArch_v1_8
Definition Triple.h:191
@ AMDGPUSubArch801
Definition Triple.h:210
@ ARMSubArch_v9_4a
Definition Triple.h:126
@ ARMSubArch_v8_5a
Definition Triple.h:135
@ AArch64SubArch_lfi
Definition Triple.h:161
@ ARMSubArch_v6m
Definition Triple.h:152
@ ARMSubArch_v9_3a
Definition Triple.h:127
@ DXILSubArch_v1_9
Definition Triple.h:192
@ AMDGPUSubArch704
Definition Triple.h:206
@ AMDGPUSubArch1031
Definition Triple.h:243
@ AMDGPUSubArch1101
Definition Triple.h:252
@ ARMSubArch_v9
Definition Triple.h:130
@ AMDGPUSubArch13
Definition Triple.h:275
@ AMDGPUSubArch12
Definition Triple.h:266
@ DXILSubArch_v1_4
Definition Triple.h:187
@ AMDGPUSubArch700
Definition Triple.h:202
@ SPIRVSubArch_v11
Definition Triple.h:175
@ PPCSubArch_spe
Definition Triple.h:171
@ AMDGPUSubArch1032
Definition Triple.h:244
@ AMDGPUSubArch1310
Definition Triple.h:276
@ AMDGPUSubArch908
Definition Triple.h:228
LLVM_ABI bool getMacOSXVersion(VersionTuple &Version) const
Parse the version number as with getOSVersion and then translate generic "darwin" versions to the cor...
Definition Triple.cpp:1490
bool isSPARC64() const
Tests whether the target is 64-bit SPARC (big endian).
Definition Triple.h:1187
bool isWindowsCygwinEnvironment() const
Definition Triple.h:809
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.
Definition Triple.cpp:2436
Triple(StringRef Str)
Definition Triple.h:462
bool isMacOSX() const
Is this a Mac OS X triple.
Definition Triple.h:680
Triple(const std::string &Str)
Definition Triple.h:464
bool isOSFreeBSD() const
Definition Triple.h:747
bool isXROS() const
Is this an Apple XROS triple.
Definition Triple.h:700
LLVM_ABI void setEnvironmentName(StringRef Str)
Set the optional environment (fourth) component of the triple by name.
Definition Triple.cpp:1720
LLVM_ABI void setOS(OSType Kind)
Set the operating system (third) component of the triple to a known type.
Definition Triple.cpp:1684
bool isX86_32() const
Tests whether the target is x86 (32-bit).
Definition Triple.h:1201
LLVM_ABI void setOSName(StringRef Str)
Set the operating system (third) component of the triple by name.
Definition Triple.cpp:1712
bool isAppleFirmware() const
Is this an Apple firmware triple.
Definition Triple.h:716
bool isDefaultIncrementalLinkerCompatibleByDefault() const
Tests whether MSVC linker or UEFI targets.
Definition Triple.h:1243
VendorType getVendor() const
Get the parsed vendor type of this triple.
Definition Triple.h:519
bool isSPARC() const
Tests whether the target is SPARC.
Definition Triple.h:1190
bool isPPC64() const
Tests whether the target is 64-bit PowerPC (little and big endian).
Definition Triple.h:1147
bool isOSDarwin() const
Is this a "Darwin" OS (macOS, iOS, tvOS, watchOS, DriverKit, XROS, or bridgeOS).
Definition Triple.h:722
bool hasDLLImportExport() const
Tests if the environment supports dllimport/export annotations.
Definition Triple.h:1293
bool isSPIRVLogical() const
Tests whether the target is SPIR-V Logical.
Definition Triple.h:983
static LLVM_ABI StringRef getEnvironmentTypeName(EnvironmentType Kind)
Get the canonical name for the Kind environment.
Definition Triple.cpp:404
bool isOSVersionLT(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
Helper function for doing comparisons against version numbers included in the target triple.
Definition Triple.h:644
bool isTvOS() const
Is this an Apple tvOS triple.
Definition Triple.h:692
bool isOSEmscripten() const
Tests whether the OS is Emscripten.
Definition Triple.h:844
bool isWindowsArm64EC() const
Definition Triple.h:796
bool isOSVersionGE(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
Definition Triple.h:655
bool isWatchOS() const
Is this an Apple watchOS triple.
Definition Triple.h:695
bool empty() const
Whether the triple is empty / default constructed.
Definition Triple.h:583
bool isiOS() const
Is this an iOS triple.
Definition Triple.h:689
bool isMIPS() const
Tests whether the target is MIPS (little and big endian, 32- or 64-bit).
Definition Triple.h:1133
bool isMacOSXVersionGE(unsigned Major, unsigned Minor=0, unsigned Micro=0) const
Definition Triple.h:673
bool isWALI() const
Tests whether the target uses WALI Wasm.
Definition Triple.h:888
bool isOSGlibc() const
Tests whether the OS uses glibc.
Definition Triple.h:847
LLVM_ABI FloatABI::ABIType getDefaultFloatABI() const
Returns the default floating-point ABI for this target triple, i.e.
Definition Triple.cpp:2527
bool isTargetAEABI() const
Definition Triple.h:1037
bool isPS() const
Tests whether the target is the PS4 or PS5 platform.
Definition Triple.h:906
bool isWasm() const
Tests whether the target is wasm (32- and 64-bit).
Definition Triple.h:1210
bool isVulkanOS() const
Definition Triple.h:950
LLVM_ABI StringRef getArchName() const
Get the architecture (first) component of the triple.
Definition Triple.cpp:1417
bool isOSIAMCU() const
Definition Triple.h:755
bool isOpenHOS() const
Definition Triple.h:941
bool isMacCatalystEnvironment() const
Definition Triple.h:733
bool isPS5() const
Tests whether the target is the PS5 platform.
Definition Triple.h:900
bool isSPIRV() const
Tests whether the target is SPIR-V (32/64-bit/Logical).
Definition Triple.h:974
bool isAArch64() const
Tests whether the target is AArch64 (little and big endian).
Definition Triple.h:1094
static LLVM_ABI StringRef getObjectFormatTypeName(ObjectFormatType ObjectFormat)
Get the name for the Object format.
Definition Triple.cpp:417
bool isAppleMachO() const
Is this an Apple MachO triple.
Definition Triple.h:711
LLVM_ABI bool isArch16Bit() const
Test whether the architecture is 16-bit.
Definition Triple.cpp:1831
LLVM_ABI llvm::Triple getBigEndianArchVariant() const
Form a triple with a big endian variant of the current architecture.
Definition Triple.cpp:2069
LLVM_ABI VersionTuple getiOSVersion() const
Parse the version number as with getOSVersion.
Definition Triple.cpp:1544
bool hasDefaultEmulatedTLS() const
Tests whether the target uses emulated TLS as default.
Definition Triple.h:1274
bool isSystemZ() const
Tests whether the target is SystemZ.
Definition Triple.h:1193
LLVM_ABI StringRef getEnvironmentVersionString() const
Get the version component of the environment component as a single string (the version after the envi...
Definition Triple.cpp:1453
bool isPPC32SecurePlt() const
Tests whether the target 32-bit PowerPC uses Secure PLT.
Definition Triple.h:1160
bool isTime64ABI() const
Tests if the target forces 64-bit time_t on a 32-bit architecture.
Definition Triple.h:1248
LLVM_ABI bool isArch32Bit() const
Test whether the architecture is 32-bit.
Definition Triple.cpp:1827
bool operator!=(const Triple &Other) const
Definition Triple.h:479
unsigned getOSMajorVersion() const
Return just the major version number, this is specialized because it is a common query.
Definition Triple.h:547
LLVM_ABI bool isCompatibleWith(const Triple &Other) const
Test whether target triples are compatible.
Definition Triple.cpp:2270
bool isOSFuchsia() const
Definition Triple.h:749
bool isOSBinFormatELF() const
Tests whether the OS uses the ELF binary format.
Definition Triple.h:865
bool isWindowsMSVCEnvironment() const
Checks if the environment could be MSVC.
Definition Triple.h:790
bool hasEnvironment() const
Does this triple have the optional environment (fourth) component?
Definition Triple.h:525
LLVM_ABI unsigned getDefaultWCharSize() const
Returns the default wchar_t size (in bytes) for this target triple.
Definition Triple.cpp:2260
bool isKnownWindowsMSVCEnvironment() const
Checks if the environment is MSVC.
Definition Triple.h:785
static LLVM_ABI StringRef getArchTypePrefix(ArchType Kind)
Get the "prefix" canonical name for the Kind architecture.
Definition Triple.cpp:257
bool isOSHaiku() const
Tests whether the OS is Haiku.
Definition Triple.h:770
LLVM_ABI void setArch(ArchType Kind, SubArchType SubArch=NoSubArch)
Set the architecture (first) component of the triple to a known type.
Definition Triple.cpp:1676
bool isDXIL() const
Tests whether the target is DXIL.
Definition Triple.h:946
LLVM_ABI void setVendor(VendorType Kind)
Set the vendor (second) component of the triple to a known type.
Definition Triple.cpp:1680
bool isGNUEnvironment() const
Definition Triple.h:759
bool isLoongArch() const
Tests whether the target is LoongArch (32- and 64-bit).
Definition Triple.h:1120
bool isShaderStageEnvironment() const
Definition Triple.h:956
bool isWindowsItaniumEnvironment() const
Definition Triple.h:805
bool isVE() const
Tests whether the target is VE.
Definition Triple.h:1207
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Definition Twine.h:82
Represents a version number in the form major[.minor[.subminor[.build]]].
unsigned getMajor() const
Retrieve the major version number.
This is an optimization pass for GlobalISel generic memory operations.
LongDoubleFormat
The floating-point format used for the target's "long double" type.
Definition CodeGen.h:67
@ Other
Any other memory.
Definition ModRef.h:68
ExceptionHandling
Definition CodeGen.h:54
Implement std::hash so that hash_code can be used in STL containers.
Definition BitVector.h:878