LLVM
8.0.1
|
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 43 of file StringSwitch.h.
|
inlineexplicit |
Definition at line 53 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::operator=().
|
delete |
|
inline |
Definition at line 63 of file StringSwitch.h.
References LLVM_ATTRIBUTE_ALWAYS_INLINE, and llvm::StringSwitch< T, R >::~StringSwitch().
|
default |
Referenced by llvm::StringSwitch< T, R >::StringSwitch().
|
inline |
Definition at line 70 of file StringSwitch.h.
References LLVM_ATTRIBUTE_ALWAYS_INLINE.
Referenced by llvm::AArch64StringToVectorLayout(), llvm::ARMCondCodeFromString(), llvm::StringSwitch< T, R >::Cases(), checkParametrizedPassName(), llvm::classifyEHPersonality(), 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::ConstrainedFPIntrinsic::getExceptionBehavior(), llvm::MipsAsmBackend::getFixupKind(), llvm::ARM::getFPUSynonym(), llvm::sys::detail::getHostCPUNameForARM(), llvm::sys::detail::getHostCPUNameForPowerPC(), llvm::sys::getHostNumPhysicalCores(), getIdentifierKind(), llvm::TGLexer::getLoc(), llvm::dwarf::getMacinfo(), getMClassFlagsMask(), getMetadataKeywordKind(), llvm::DICompileUnit::getNameTableKind(), getNextRegister(), getOSTypeFromPlatform(), llvm::LanaiTargetLowering::getRegisterByName(), llvm::SparcTargetLowering::getRegisterByName(), llvm::AVRTargetLowering::getRegisterByName(), llvm::SITargetLowering::getRegisterByName(), llvm::PPCTargetLowering::getRegisterByName(), llvm::X86TargetLowering::getRegisterByName(), getRelaxedOpcode(), llvm::ConstrainedFPIntrinsic::getRoundingMode(), llvm::pdb::PDBSymbolCompiland::getSourceFileFullPath(), getSpecialRegForName(), llvm::MipsTargetLowering::getTypeForExtReturn(), llvm::RISCVMCExpr::getVariantKindForName(), llvm::object::WasmObjectFile::getWasmRelocation(), llvm::yaml::ScalarTraits< ELFArchMapper >::input(), isRegOrImmWithInputMods(), llvm::object::MachOObjectFile::isValidArch(), matchSVEPredicateVectorRegName(), mayTailCallThisCC(), MCAttrForString(), parseArch(), parseAttrKind(), parseNamePrefix(), llvm::SparcMCExpr::parseVariantKind(), parseVendor(), llvm::SymbolRemappingReader::read(), RefineErrorLoc(), llvm::LPAC::stringToLanaiAluCode(), llvm::RISCVFPRndMode::stringToRoundingMode(), and UpgradeIntrinsicFunction1().
|
inline |
Definition at line 155 of file StringSwitch.h.
References llvm::StringRef::equals_lower(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
Referenced by llvm::StringSwitch< T, R >::CasesLower().
|
inline |
Definition at line 94 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
Referenced by llvm::StringSwitch< T, R >::Cases(), llvm::ARM::getArchSynonym(), llvm::ARM::getFPUSynonym(), MCAttrForString(), parseArch(), RefineErrorLoc(), llvm::Triple::Triple(), and UpgradeIntrinsicFunction1().
|
inline |
Definition at line 99 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 105 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 111 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 117 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 124 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 131 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 138 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 146 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::Case(), llvm::StringSwitch< T, R >::Cases(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 179 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::CaseLower(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
Referenced by llvm::StringSwitch< T, R >::CasesLower().
|
inline |
Definition at line 184 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::CaseLower(), llvm::StringSwitch< T, R >::CasesLower(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 190 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::CaseLower(), llvm::StringSwitch< T, R >::CasesLower(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 196 of file StringSwitch.h.
References llvm::StringSwitch< T, R >::CaseLower(), llvm::StringSwitch< T, R >::CasesLower(), LLVM_ATTRIBUTE_ALWAYS_INLINE, and LLVM_NODISCARD.
|
inline |
Definition at line 203 of file StringSwitch.h.
References LLVM_ATTRIBUTE_ALWAYS_INLINE, and LLVM_NODISCARD.
Referenced by llvm::AArch64StringToVectorLayout(), llvm::ARMCondCodeFromString(), checkParametrizedPassName(), llvm::classifyEHPersonality(), 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::ConstrainedFPIntrinsic::getExceptionBehavior(), llvm::MipsAsmBackend::getFixupKind(), llvm::ARM::getFPUSynonym(), llvm::sys::detail::getHostCPUNameForARM(), llvm::sys::detail::getHostCPUNameForPowerPC(), llvm::sys::getHostNumPhysicalCores(), getHWDivSynonym(), getIdentifierKind(), llvm::TGLexer::getLoc(), llvm::dwarf::getMacinfo(), getMClassFlagsMask(), getMetadataKeywordKind(), llvm::DICompileUnit::getNameTableKind(), getNextRegister(), getOSTypeFromPlatform(), llvm::LanaiTargetLowering::getRegisterByName(), llvm::SparcTargetLowering::getRegisterByName(), llvm::AVRTargetLowering::getRegisterByName(), llvm::HexagonTargetLowering::getRegisterByName(), llvm::SITargetLowering::getRegisterByName(), llvm::MipsTargetLowering::getRegisterByName(), llvm::PPCTargetLowering::getRegisterByName(), llvm::X86TargetLowering::getRegisterByName(), getRelaxedOpcode(), llvm::ConstrainedFPIntrinsic::getRoundingMode(), llvm::pdb::PDBSymbolCompiland::getSourceFileFullPath(), getSpecialRegForName(), llvm::MipsTargetLowering::getTypeForExtReturn(), llvm::RISCVMCExpr::getVariantKindForName(), llvm::object::WasmObjectFile::getWasmRelocation(), llvm::yaml::ScalarTraits< ELFArchMapper >::input(), isRegOrImmWithInputMods(), llvm::object::MachOObjectFile::isValidArch(), LowerVectorINT_TO_FP(), llvm::object::MachOObjectFile::mapDebugSectionName(), llvm::object::COFFObjectFile::mapDebugSectionName(), matchSVEPredicateVectorRegName(), MaybePredicatedInst(), mayTailCallThisCC(), MCAttrForString(), parseArch(), llvm::ARM::parseArchISA(), parseAttrKind(), parseEnvironment(), parseFormat(), parseNamePrefix(), parseOS(), parseSubArch(), llvm::SparcMCExpr::parseVariantKind(), parseVendor(), llvm::SymbolRemappingReader::read(), RefineErrorLoc(), SizeForSuffix(), llvm::LPAC::stringToLanaiAluCode(), llvm::RISCVFPRndMode::stringToRoundingMode(), llvm::LPCC::suffixToLanaiCondCode(), llvm::Triple::Triple(), and UpgradeIntrinsicFunction1().
|
inline |
Definition at line 78 of file StringSwitch.h.
References llvm::StringRef::endswith(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
Referenced by parseFormat(), parseSubArch(), SizeForSuffix(), and llvm::LPCC::suffixToLanaiCondCode().
|
inline |
Definition at line 163 of file StringSwitch.h.
References llvm::StringRef::endswith_lower(), and LLVM_ATTRIBUTE_ALWAYS_INLINE.
|
inline |
Definition at line 211 of file StringSwitch.h.
References assert().
|
delete |
Referenced by llvm::StringSwitch< T, R >::StringSwitch().
|
delete |
|
inline |
Definition at line 86 of file StringSwitch.h.
References LLVM_ATTRIBUTE_ALWAYS_INLINE, and llvm::StringRef::startswith().
Referenced by llvm::Triple::getArchTypeForLLVMName(), llvm::object::WasmObjectFile::getWasmRelocation(), MaybePredicatedInst(), parseArch(), llvm::ARM::parseArchISA(), parseEnvironment(), parseOS(), and llvm::Triple::Triple().
|
inline |
Definition at line 171 of file StringSwitch.h.
References LLVM_ATTRIBUTE_ALWAYS_INLINE, and llvm::StringRef::startswith_lower().