|
LLVM
10.0.0
|
A switch()-like statement whose cases are string literals. More...
#include "llvm/ADT/StringSwitch.h"
A switch()-like statement whose cases are string literals.
The StringSwitch class is a simple form of a switch() statement that determines whether the given string matches one of the given string literals. The template type parameter T is the type of the value that will be returned from the string-switch expression. For example, the following code switches on the name of a color in argv[i]:
Definition at line 42 of file StringSwitch.h.
|
inlineexplicit |
Definition at line 51 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::operator=().
|
delete |
|
inline |
Definition at line 61 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::~StringSwitch().
|
default |
Referenced by llvm::StringSwitch< T, R >::StringSwitch().
|
inline |
Definition at line 67 of file StringSwitch.h.
Referenced by llvm::AArch64StringToVectorLayout(), llvm::ARMCondCodeFromString(), llvm::ARMVectorCondCodeFromString(), llvm::StringSwitch< T, R >::Cases(), checkParametrizedPassName(), llvm::classifyEHPersonality(), llvm::MachO::Target::create(), llvm::DWARFContext::defaultErrorHandler(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), llvm::MipsSEFrameLowering::emitPrologue(), encodeCnt(), llvm::ARM::getArchSynonym(), llvm::Triple::getArchTypeForLLVMName(), getARClassRegisterMask(), llvm::DIFile::getChecksumKind(), llvm::DICompileUnit::getEmissionKind(), getEmulation(), llvm::MipsAsmBackend::getFixupKind(), getFixupKindSize(), llvm::ARM::getFPUSynonym(), llvm::sys::detail::getHostCPUNameForARM(), llvm::sys::detail::getHostCPUNameForPowerPC(), llvm::sys::getHostNumPhysicalCores(), getIdentifierKind(), llvm::TGLexer::getLoc(), llvm::getMachineType(), llvm::dwarf::getMacinfo(), getMClassFlagsMask(), getMetadataKeywordKind(), llvm::DICompileUnit::getNameTableKind(), getOSTypeFromPlatform(), llvm::ConstrainedFPCmpIntrinsic::getPredicate(), llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), llvm::VETargetLowering::getRegisterByName(), llvm::LanaiTargetLowering::getRegisterByName(), llvm::SparcTargetLowering::getRegisterByName(), llvm::AVRTargetLowering::getRegisterByName(), llvm::HexagonTargetLowering::getRegisterByName(), llvm::SITargetLowering::getRegisterByName(), llvm::PPCTargetLowering::getRegisterByName(), llvm::X86TargetLowering::getRegisterByName(), llvm::pdb::PDBSymbolCompiland::getSourceFileFullPath(), getSpecialRegForName(), llvm::RISCVABI::getTargetABI(), llvm::RISCVMCExpr::getVariantKindForName(), llvm::VFABI::getVFParamKindFromString(), llvm::object::WasmObjectFile::getWasmRelocation(), llvm::yaml::ScalarTraits< ELFArchMapper >::input(), llvm::yaml::ScalarTraits< SwiftVersion >::input(), insertNoDuplicates(), isRegOrImmWithInputMods(), MCAttrForString(), llvm::yaml::ScalarTraits< FlowStringRef >::mustQuote(), parseArch(), parseAttrKind(), llvm::parseDenormalFPAttribute(), llvm::remarks::parseFormat(), parseGlobalValue(), parseIRValue(), parseNamePrefix(), llvm::SparcMCExpr::parseVariantKind(), parseVendor(), llvm::SymbolRemappingReader::read(), RefineErrorLoc(), llvm::LPAC::stringToLanaiAluCode(), llvm::RISCVFPRndMode::stringToRoundingMode(), llvm::StrToExceptionBehavior(), llvm::StrToRoundingMode(), and UpgradeIntrinsicFunction1().
|
inline |
Definition at line 140 of file StringSwitch.h.
References llvm::StringRef::equals_lower().
Referenced by llvm::StringSwitch< T, R >::CasesLower().
|
inline |
Definition at line 88 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case().
Referenced by llvm::StringSwitch< T, R >::Cases(), llvm::ARM::getArchSynonym(), llvm::ARM::getFPUSynonym(), llvm::getMachineType(), llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), isValidAIXExternalSymSDNode(), MCAttrForString(), parseArch(), RefineErrorLoc(), llvm::Triple::Triple(), and UpgradeIntrinsicFunction1().
|
inline |
Definition at line 92 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Cases().
|
inline |
Definition at line 97 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Cases().
|
inline |
Definition at line 102 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Cases().
|
inline |
Definition at line 107 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Cases().
|
inline |
Definition at line 113 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Cases().
|
inline |
Definition at line 119 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Cases().
|
inline |
Definition at line 125 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Cases().
|
inline |
Definition at line 132 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), and llvm::StringSwitch< T, R >::Cases().
|
inline |
Definition at line 161 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::CaseLower().
Referenced by llvm::StringSwitch< T, R >::CasesLower().
|
inline |
Definition at line 165 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::CaseLower(), and llvm::StringSwitch< T, R >::CasesLower().
|
inline |
Definition at line 170 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::CaseLower(), and llvm::StringSwitch< T, R >::CasesLower().
|
inline |
Definition at line 175 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::CaseLower(), llvm::StringSwitch< T, R >::CasesLower(), and LLVM_NODISCARD.
|
inline |
Definition at line 181 of file StringSwitch.h.
References LLVM_NODISCARD.
Referenced by llvm::AArch64StringToVectorLayout(), llvm::ARMCondCodeFromString(), llvm::ARMVectorCondCodeFromString(), checkParametrizedPassName(), llvm::classifyEHPersonality(), llvm::MachO::Target::create(), llvm::createX86_64AsmBackend(), llvm::DWARFContext::defaultErrorHandler(), llvm::AMDGPU::HSAMD::MetadataStreamerV2::emitKernel(), llvm::MipsSEFrameLowering::emitPrologue(), encodeCnt(), llvm::ARM::getArchSynonym(), llvm::Triple::getArchTypeForLLVMName(), getARClassRegisterMask(), llvm::DIFile::getChecksumKind(), llvm::DICompileUnit::getEmissionKind(), getEmulation(), llvm::MipsAsmBackend::getFixupKind(), getFixupKindSize(), llvm::ARM::getFPUSynonym(), llvm::sys::detail::getHostCPUNameForARM(), llvm::sys::detail::getHostCPUNameForPowerPC(), llvm::sys::getHostNumPhysicalCores(), getHWDivSynonym(), getIdentifierKind(), llvm::TGLexer::getLoc(), llvm::getMachineType(), llvm::dwarf::getMacinfo(), getMClassFlagsMask(), getMetadataKeywordKind(), llvm::DICompileUnit::getNameTableKind(), getOSTypeFromPlatform(), llvm::ConstrainedFPCmpIntrinsic::getPredicate(), llvm::RISCVTargetLowering::getRegForInlineAsmConstraint(), llvm::VETargetLowering::getRegisterByName(), llvm::LanaiTargetLowering::getRegisterByName(), llvm::SparcTargetLowering::getRegisterByName(), llvm::AVRTargetLowering::getRegisterByName(), llvm::HexagonTargetLowering::getRegisterByName(), llvm::SITargetLowering::getRegisterByName(), llvm::MipsTargetLowering::getRegisterByName(), llvm::PPCTargetLowering::getRegisterByName(), llvm::X86TargetLowering::getRegisterByName(), llvm::pdb::PDBSymbolCompiland::getSourceFileFullPath(), getSpecialRegForName(), llvm::RISCVABI::getTargetABI(), llvm::RISCVMCExpr::getVariantKindForName(), llvm::VFABI::getVFParamKindFromString(), llvm::object::WasmObjectFile::getWasmRelocation(), llvm::yaml::ScalarTraits< ELFArchMapper >::input(), llvm::yaml::ScalarTraits< SwiftVersion >::input(), insertNoDuplicates(), isRegOrImmWithInputMods(), isValidAIXExternalSymSDNode(), LowerVectorINT_TO_FP(), llvm::remarks::magicToFormat(), llvm::object::MachOObjectFile::mapDebugSectionName(), llvm::object::COFFObjectFile::mapDebugSectionName(), MaybePredicatedInst(), MCAttrForString(), llvm::yaml::ScalarTraits< FlowStringRef >::mustQuote(), parseArch(), llvm::ARM::parseArchISA(), parseAttrKind(), llvm::parseDenormalFPAttribute(), parseEnvironment(), llvm::remarks::parseFormat(), parseFormat(), parseGlobalValue(), parseIRValue(), parseNamePrefix(), parseOS(), parseSubArch(), llvm::SparcMCExpr::parseVariantKind(), parseVendor(), llvm::SymbolRemappingReader::read(), RefineErrorLoc(), SizeForSuffix(), llvm::LPAC::stringToLanaiAluCode(), llvm::RISCVFPRndMode::stringToRoundingMode(), llvm::StrToExceptionBehavior(), llvm::StrToRoundingMode(), llvm::LPCC::suffixToLanaiCondCode(), llvm::Triple::Triple(), and UpgradeIntrinsicFunction1().
|
inline |
Definition at line 74 of file StringSwitch.h.
References llvm::StringRef::endswith().
Referenced by parseFormat(), parseSubArch(), SizeForSuffix(), and llvm::LPCC::suffixToLanaiCondCode().
|
inline |
Definition at line 147 of file StringSwitch.h.
References llvm::StringRef::endswith_lower().
|
inline |
Definition at line 188 of file StringSwitch.h.
References assert().
|
delete |
Referenced by llvm::StringSwitch< T, R >::StringSwitch().
|
delete |
|
inline |
Definition at line 81 of file StringSwitch.h.
References llvm::StringRef::startswith().
Referenced by llvm::Triple::getArchTypeForLLVMName(), llvm::object::WasmObjectFile::getWasmRelocation(), llvm::remarks::magicToFormat(), MaybePredicatedInst(), parseArch(), llvm::ARM::parseArchISA(), parseEnvironment(), parseOS(), llvm::Triple::Triple(), and UpgradeIntrinsicFunction1().
|
inline |
Definition at line 154 of file StringSwitch.h.
References llvm::StringRef::startswith_lower().
1.8.13