LLVM 20.0.0git
Functions
Triple.cpp File Reference
#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)
 

Function Documentation

◆ getDefaultFormat()

static Triple::ObjectFormatType getDefaultFormat ( const Triple T)
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().

◆ getDXILArchNameFromShaderModel()

static StringRef getDXILArchNameFromShaderModel ( StringRef  ShaderModelStr)
static

◆ parseArch()

static Triple::ArchType parseArch ( StringRef  ArchName)
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().

◆ parseARMArch()

static Triple::ArchType parseARMArch ( StringRef  ArchName)
static

◆ parseBPFArch()

static Triple::ArchType parseBPFArch ( StringRef  ArchName)
static

◆ parseEnvironment()

static Triple::EnvironmentType parseEnvironment ( StringRef  EnvironmentName)
static

◆ parseFormat()

static Triple::ObjectFormatType parseFormat ( StringRef  EnvironmentName)
static

◆ parseOS()

static Triple::OSType parseOS ( StringRef  OSName)
static

◆ parseSubArch()

static Triple::SubArchType parseSubArch ( StringRef  SubArchName)
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().

◆ parseVendor()

static Triple::VendorType parseVendor ( StringRef  VendorName)
static

◆ parseVersionFromName()

static VersionTuple parseVersionFromName ( StringRef  Name)
static