LLVM
15.0.0git
|
Specialization of TypeSwitch for void returning callables. More...
#include "llvm/ADT/TypeSwitch.h"
Public Types | |
using | BaseT = detail::TypeSwitchBase< TypeSwitch< T, void >, T > |
Public Member Functions | |
TypeSwitch (TypeSwitch &&other)=default | |
template<typename CaseT , typename CallableT > | |
TypeSwitch< T, void > & | Case (CallableT &&caseFn) |
Add a case on the given type. More... | |
template<typename CallableT > | |
void | Default (CallableT &&defaultFn) |
As a default, invoke the given callable within the root value. More... | |
![]() | |
TypeSwitchBase (const T &value) | |
TypeSwitchBase (TypeSwitchBase &&other) | |
TypeSwitchBase (const TypeSwitchBase &)=delete | |
TypeSwitchBase is not copyable. More... | |
~TypeSwitchBase ()=default | |
void | operator= (const TypeSwitchBase &)=delete |
void | operator= (TypeSwitchBase &&other)=delete |
LLVM_ATTRIBUTE_ALWAYS_INLINE LLVM_ATTRIBUTE_NODEBUG TypeSwitch< T, void > & | Case (CallableT &&caseFn) |
Invoke a case on the derived class with multiple case types. More... | |
TypeSwitch< T, void > & | Case (CallableT &&caseFn) |
Invoke a case on the derived class, inferring the type of the Case from the first input of the given callable. More... | |
Additional Inherited Members | |
![]() | |
using | has_dyn_cast_t = decltype(std::declval< ValueT & >().template dyn_cast< CastT >()) |
Trait to check whether ValueT provides a 'dyn_cast' method with type CastT . More... | |
![]() | |
static auto | castValue (ValueT value, typename std::enable_if_t< is_detected< has_dyn_cast_t, ValueT, CastT >::value > *=nullptr) |
Attempt to dyn_cast the given value to CastT . More... | |
static auto | castValue (ValueT value, typename std::enable_if_t< !is_detected< has_dyn_cast_t, ValueT, CastT >::value > *=nullptr) |
Attempt to dyn_cast the given value to CastT . More... | |
![]() | |
const T | value |
The root value we are switching on. More... | |
Specialization of TypeSwitch for void returning callables.
Definition at line 154 of file TypeSwitch.h.
using llvm::TypeSwitch< T, void >::BaseT = detail::TypeSwitchBase<TypeSwitch<T, void>, T> |
Definition at line 157 of file TypeSwitch.h.
|
default |
|
inline |
Add a case on the given type.
Definition at line 164 of file TypeSwitch.h.
References llvm::detail::TypeSwitchBase< TypeSwitch< T, void >, T >::value.
|
inline |
As a default, invoke the given callable within the root value.
Definition at line 177 of file TypeSwitch.h.
References llvm::detail::TypeSwitchBase< TypeSwitch< T, void >, T >::value.