LLVM 20.0.0git
|
#include "llvm/TargetParser/Triple.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/SwapByteOrder.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/TargetParser/ARMTargetParser.h"
#include "llvm/TargetParser/ARMTargetParserCommon.h"
#include "llvm/TargetParser/Host.h"
#include <cassert>
#include <cstring>
Go to the source code of this file.
Functions | |
static Triple::ArchType | parseBPFArch (StringRef ArchName) |
static Triple::ArchType | parseARMArch (StringRef ArchName) |
static Triple::ArchType | parseArch (StringRef ArchName) |
static Triple::VendorType | parseVendor (StringRef VendorName) |
static Triple::OSType | parseOS (StringRef OSName) |
static Triple::EnvironmentType | parseEnvironment (StringRef EnvironmentName) |
static Triple::ObjectFormatType | parseFormat (StringRef EnvironmentName) |
static Triple::SubArchType | parseSubArch (StringRef SubArchName) |
static Triple::ObjectFormatType | getDefaultFormat (const Triple &T) |
static VersionTuple | parseVersionFromName (StringRef Name) |
static StringRef | getDXILArchNameFromShaderModel (StringRef ShaderModelStr) |
|
static |
Definition at line 897 of file Triple.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, llvm::Triple::aarch64_be, llvm::Triple::amdgcn, llvm::Triple::amdil, llvm::Triple::amdil64, llvm::Triple::arc, llvm::Triple::arm, llvm::Triple::armeb, llvm::Triple::avr, llvm::Triple::bpfeb, llvm::Triple::bpfel, llvm::Triple::COFF, llvm::Triple::csky, llvm::Triple::DXContainer, llvm::Triple::dxil, llvm::Triple::ELF, llvm::Triple::GOFF, llvm::Triple::hexagon, llvm::Triple::hsail, llvm::Triple::hsail64, llvm::Triple::kalimba, llvm::Triple::lanai, llvm_unreachable, llvm::Triple::loongarch32, llvm::Triple::loongarch64, llvm::Triple::m68k, llvm::Triple::MachO, llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::msp430, llvm::Triple::nvptx, llvm::Triple::nvptx64, llvm::Triple::ppc, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::Triple::ppcle, llvm::Triple::r600, llvm::Triple::renderscript32, llvm::Triple::renderscript64, llvm::Triple::riscv32, llvm::Triple::riscv64, llvm::Triple::shave, llvm::Triple::sparc, llvm::Triple::sparcel, llvm::Triple::sparcv9, llvm::Triple::spir, llvm::Triple::spir64, llvm::Triple::spirv, llvm::Triple::SPIRV, llvm::Triple::spirv32, llvm::Triple::spirv64, llvm::Triple::systemz, llvm::Triple::tce, llvm::Triple::tcele, llvm::Triple::thumb, llvm::Triple::thumbeb, llvm::Triple::UEFI, llvm::Triple::UnknownArch, llvm::Triple::ve, llvm::Triple::Wasm, llvm::Triple::wasm32, llvm::Triple::wasm64, llvm::Triple::Win32, llvm::Triple::x86, llvm::Triple::x86_64, llvm::Triple::XCOFF, llvm::Triple::xcore, and llvm::Triple::xtensa.
Referenced by llvm::Triple::setEnvironment(), and llvm::Triple::Triple().
Definition at line 1066 of file Triple.cpp.
References llvm::StringRef::drop_front(), llvm::Triple::dxil, llvm::Triple::DXILSubArch_v1_0, llvm::Triple::DXILSubArch_v1_1, llvm::Triple::DXILSubArch_v1_2, llvm::Triple::DXILSubArch_v1_3, llvm::Triple::DXILSubArch_v1_4, llvm::Triple::DXILSubArch_v1_5, llvm::Triple::DXILSubArch_v1_6, llvm::Triple::DXILSubArch_v1_7, llvm::Triple::DXILSubArch_v1_8, llvm::VersionTuple::empty(), llvm::Triple::getArchName(), llvm::VersionTuple::getMajor(), llvm::VersionTuple::getMinor(), llvm::Triple::LatestDXILSubArch, parseVersionFromName(), and llvm::report_fatal_error().
Referenced by llvm::Triple::getDXILVersion(), and llvm::Triple::normalize().
|
static |
Definition at line 537 of file Triple.cpp.
References llvm::Triple::aarch64, llvm::Triple::aarch64_32, llvm::Triple::aarch64_be, llvm::Triple::amdgcn, llvm::Triple::amdil, llvm::Triple::amdil64, llvm::Triple::arc, llvm::Triple::arm, llvm::Triple::armeb, llvm::Triple::avr, llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), llvm::Triple::csky, llvm::StringSwitch< T, R >::Default(), llvm::Triple::dxil, llvm::Triple::hexagon, llvm::Triple::hsail, llvm::Triple::hsail64, llvm::Triple::kalimba, llvm::Triple::lanai, llvm::Triple::loongarch32, llvm::Triple::loongarch64, llvm::Triple::m68k, llvm::Triple::mips, llvm::Triple::mips64, llvm::Triple::mips64el, llvm::Triple::mipsel, llvm::Triple::msp430, llvm::Triple::nvptx, llvm::Triple::nvptx64, parseARMArch(), parseBPFArch(), llvm::Triple::ppc, llvm::Triple::ppc64, llvm::Triple::ppc64le, llvm::Triple::ppcle, llvm::Triple::r600, llvm::Triple::renderscript32, llvm::Triple::renderscript64, llvm::Triple::riscv32, llvm::Triple::riscv64, llvm::Triple::shave, llvm::Triple::sparc, llvm::Triple::sparcel, llvm::Triple::sparcv9, llvm::Triple::spir, llvm::Triple::spir64, llvm::Triple::spirv, llvm::Triple::spirv32, llvm::Triple::spirv64, llvm::StringRef::starts_with(), llvm::StringSwitch< T, R >::StartsWith(), llvm::Triple::systemz, llvm::Triple::tce, llvm::Triple::tcele, llvm::Triple::thumb, llvm::Triple::thumbeb, llvm::Triple::UnknownArch, llvm::Triple::ve, llvm::Triple::wasm32, llvm::Triple::wasm64, llvm::Triple::x86, llvm::Triple::x86_64, llvm::Triple::xcore, and llvm::Triple::xtensa.
Referenced by llvm::ARM::getDefaultCPU(), llvm::CSKY::getDefaultCPU(), llvm::Triple::normalize(), llvm::ARM::parseArchProfile(), llvm::ARM::parseArchVersion(), and llvm::Triple::Triple().
|
static |
Definition at line 472 of file Triple.cpp.
References llvm::ARM::AARCH64, llvm::Triple::aarch64, llvm::Triple::aarch64_be, llvm::ARM::ARM, llvm::Triple::arm, llvm::Triple::armeb, llvm::ARM::BIG, llvm::StringRef::empty(), llvm::ARM::getCanonicalArchName(), llvm::ARM::INVALID, llvm::ARM::LITTLE, llvm::ARM::M, llvm::ARM::parseArchEndian(), llvm::ARM::parseArchISA(), llvm::ARM::parseArchProfile(), llvm::ARM::parseArchVersion(), Profile, llvm::StringRef::starts_with(), llvm::ARM::THUMB, llvm::Triple::thumb, llvm::Triple::thumbeb, llvm::Triple::UnknownArch, and llvm::Version.
Referenced by parseArch().
|
static |
Definition at line 387 of file Triple.cpp.
References llvm::Triple::bpfeb, llvm::Triple::bpfel, llvm::sys::IsLittleEndianHost, and llvm::Triple::UnknownArch.
Referenced by llvm::Triple::getArchTypeForLLVMName(), and parseArch().
|
static |
Definition at line 697 of file Triple.cpp.
References llvm::Triple::Amplification, llvm::Triple::Android, llvm::Triple::AnyHit, llvm::Triple::Callable, llvm::Triple::ClosestHit, llvm::Triple::CODE16, llvm::Triple::Compute, llvm::Triple::CoreCLR, llvm::Triple::Cygnus, llvm::StringSwitch< T, R >::Default(), llvm::Triple::Domain, llvm::Triple::EABI, llvm::Triple::EABIHF, llvm::Triple::Geometry, llvm::Triple::GNU, llvm::Triple::GNUABI64, llvm::Triple::GNUABIN32, llvm::Triple::GNUEABI, llvm::Triple::GNUEABIHF, llvm::Triple::GNUEABIHFT64, llvm::Triple::GNUEABIT64, llvm::Triple::GNUF32, llvm::Triple::GNUF64, llvm::Triple::GNUILP32, llvm::Triple::GNUSF, llvm::Triple::GNUT64, llvm::Triple::GNUX32, llvm::Triple::Hull, llvm::Triple::Intersection, llvm::Triple::Itanium, llvm::Triple::Library, llvm::Triple::LLVM, llvm::Triple::MacABI, llvm::Triple::Mesh, llvm::Triple::Miss, llvm::Triple::MSVC, llvm::Triple::Musl, llvm::Triple::MuslABI64, llvm::Triple::MuslABIN32, llvm::Triple::MuslEABI, llvm::Triple::MuslEABIHF, llvm::Triple::MuslF32, llvm::Triple::MuslSF, llvm::Triple::MuslX32, llvm::Triple::OpenCL, llvm::Triple::OpenHOS, llvm::Triple::PAuthTest, llvm::Triple::Pixel, llvm::Triple::RayGeneration, llvm::Triple::Simulator, llvm::StringSwitch< T, R >::StartsWith(), llvm::Triple::UnknownEnvironment, and llvm::Triple::Vertex.
Referenced by llvm::Triple::normalize(), and llvm::Triple::Triple().
|
static |
Definition at line 752 of file Triple.cpp.
References llvm::Triple::COFF, llvm::StringSwitch< T, R >::Default(), llvm::Triple::ELF, llvm::StringSwitch< T, R >::EndsWith(), llvm::Triple::GOFF, llvm::Triple::MachO, llvm::Triple::SPIRV, llvm::Triple::UnknownObjectFormat, llvm::Triple::Wasm, and llvm::Triple::XCOFF.
Referenced by llvm::Triple::normalize(), and llvm::Triple::Triple().
|
static |
Definition at line 650 of file Triple.cpp.
References llvm::Triple::AIX, llvm::Triple::AMDHSA, llvm::Triple::AMDPAL, llvm::Triple::BridgeOS, llvm::Triple::CUDA, llvm::Triple::Darwin, llvm::StringSwitch< T, R >::Default(), llvm::Triple::DragonFly, llvm::Triple::DriverKit, llvm::Triple::ELFIAMCU, llvm::Triple::Emscripten, llvm::Triple::FreeBSD, llvm::Triple::Fuchsia, llvm::Triple::Haiku, llvm::Triple::HermitCore, llvm::Triple::Hurd, llvm::Triple::IOS, llvm::Triple::KFreeBSD, llvm::Triple::Linux, llvm::Triple::LiteOS, llvm::Triple::Lv2, llvm::Triple::MacOSX, llvm::Triple::Mesa3D, llvm::Triple::NaCl, llvm::Triple::NetBSD, llvm::Triple::NVCL, llvm::Triple::OpenBSD, llvm::Triple::PS4, llvm::Triple::PS5, llvm::Triple::RTEMS, llvm::Triple::Serenity, llvm::Triple::ShaderModel, llvm::Triple::Solaris, llvm::StringSwitch< T, R >::StartsWith(), llvm::Triple::TvOS, llvm::Triple::UEFI, llvm::Triple::UnknownOS, llvm::Triple::Vulkan, llvm::Triple::WASI, llvm::Triple::WatchOS, llvm::Triple::Win32, llvm::Triple::XROS, and llvm::Triple::ZOS.
Referenced by llvm::Triple::normalize(), and llvm::Triple::Triple().
|
static |
Definition at line 766 of file Triple.cpp.
References llvm::Triple::AArch64SubArch_arm64e, llvm::Triple::AArch64SubArch_arm64ec, llvm::Triple::ARMSubArch_v4t, llvm::Triple::ARMSubArch_v5, llvm::Triple::ARMSubArch_v5te, llvm::Triple::ARMSubArch_v6, llvm::Triple::ARMSubArch_v6k, llvm::Triple::ARMSubArch_v6m, llvm::Triple::ARMSubArch_v6t2, llvm::Triple::ARMSubArch_v7, llvm::Triple::ARMSubArch_v7em, llvm::Triple::ARMSubArch_v7k, llvm::Triple::ARMSubArch_v7m, llvm::Triple::ARMSubArch_v7s, llvm::Triple::ARMSubArch_v7ve, llvm::Triple::ARMSubArch_v8, llvm::Triple::ARMSubArch_v8_1a, llvm::Triple::ARMSubArch_v8_1m_mainline, llvm::Triple::ARMSubArch_v8_2a, llvm::Triple::ARMSubArch_v8_3a, llvm::Triple::ARMSubArch_v8_4a, llvm::Triple::ARMSubArch_v8_5a, llvm::Triple::ARMSubArch_v8_6a, llvm::Triple::ARMSubArch_v8_7a, llvm::Triple::ARMSubArch_v8_8a, llvm::Triple::ARMSubArch_v8_9a, llvm::Triple::ARMSubArch_v8m_baseline, llvm::Triple::ARMSubArch_v8m_mainline, llvm::Triple::ARMSubArch_v8r, llvm::Triple::ARMSubArch_v9, llvm::Triple::ARMSubArch_v9_1a, llvm::Triple::ARMSubArch_v9_2a, llvm::Triple::ARMSubArch_v9_3a, llvm::Triple::ARMSubArch_v9_4a, llvm::Triple::ARMSubArch_v9_5a, llvm::Triple::ARMSubArch_v9_6a, llvm::StringSwitch< T, R >::Default(), llvm::Triple::DXILSubArch_v1_0, llvm::Triple::DXILSubArch_v1_1, llvm::Triple::DXILSubArch_v1_2, llvm::Triple::DXILSubArch_v1_3, llvm::Triple::DXILSubArch_v1_4, llvm::Triple::DXILSubArch_v1_5, llvm::Triple::DXILSubArch_v1_6, llvm::Triple::DXILSubArch_v1_7, llvm::Triple::DXILSubArch_v1_8, llvm::StringRef::empty(), llvm::StringRef::ends_with(), llvm::StringSwitch< T, R >::EndsWith(), llvm::ARM::getCanonicalArchName(), llvm::Triple::KalimbaSubArch_v3, llvm::Triple::KalimbaSubArch_v4, llvm::Triple::KalimbaSubArch_v5, llvm::Triple::MipsSubArch_r6, llvm::Triple::NoSubArch, llvm::ARM::parseArch(), llvm::Triple::PPCSubArch_spe, llvm::Triple::SPIRVSubArch_v10, llvm::Triple::SPIRVSubArch_v11, llvm::Triple::SPIRVSubArch_v12, llvm::Triple::SPIRVSubArch_v13, llvm::Triple::SPIRVSubArch_v14, llvm::Triple::SPIRVSubArch_v15, llvm::Triple::SPIRVSubArch_v16, and llvm::StringRef::starts_with().
Referenced by llvm::Triple::Triple().
|
static |
Definition at line 630 of file Triple.cpp.
References llvm::Triple::AMD, llvm::Triple::Apple, llvm::StringSwitch< T, R >::Case(), llvm::Triple::CSR, llvm::StringSwitch< T, R >::Default(), llvm::Triple::Freescale, llvm::Triple::IBM, llvm::Triple::ImaginationTechnologies, llvm::Triple::Intel, llvm::Triple::Mesa, llvm::Triple::MipsTechnologies, llvm::Triple::NVIDIA, llvm::Triple::OpenEmbedded, llvm::Triple::PC, llvm::Triple::SCEI, llvm::Triple::SUSE, and llvm::Triple::UnknownVendor.
Referenced by llvm::Triple::normalize(), and llvm::Triple::Triple().
|
static |
Definition at line 1347 of file Triple.cpp.
References Name, and llvm::Version.
Referenced by getDXILArchNameFromShaderModel(), llvm::Triple::getDXILVersion(), llvm::Triple::getEnvironmentVersion(), and llvm::Triple::getOSVersion().