|
LLVM 22.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. | |
| template<typename CallableT> | |
| void | Default (CallableT &&defaultFn) |
| As a default, invoke the given callable within the root value. | |
| void | DefaultUnreachable (const char *message="Fell off the end of a type-switch") |
| Declare default as unreachable, making sure that all cases were handled. | |
| operator void () | |
| Public Member Functions inherited from llvm::detail::TypeSwitchBase< TypeSwitch< T, void >, T > | |
| TypeSwitchBase (const T &value) | |
| TypeSwitchBase (TypeSwitchBase &&other) | |
| ~TypeSwitchBase ()=default | |
| TypeSwitchBase (const TypeSwitchBase &)=delete | |
| TypeSwitchBase is not copyable. | |
| 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. | |
| 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. | |
Additional Inherited Members | |
| Static Protected Member Functions inherited from llvm::detail::TypeSwitchBase< TypeSwitch< T, void >, T > | |
| static decltype(auto) | castValue (ValueT &&value) |
| Attempt to dyn_cast the given value to CastT. | |
| Protected Attributes inherited from llvm::detail::TypeSwitchBase< TypeSwitch< T, void >, T > | |
| const T | value |
| The root value we are switching on. | |
Specialization of TypeSwitch for void returning callables.
Definition at line 156 of file TypeSwitch.h.
| using llvm::TypeSwitch< T, void >::BaseT = detail::TypeSwitchBase<TypeSwitch<T, void>, T> |
Definition at line 159 of file TypeSwitch.h.
|
default |
References TypeSwitch().
Referenced by Case(), and TypeSwitch().
|
inline |
Add a case on the given type.
Definition at line 166 of file TypeSwitch.h.
References llvm::detail::TypeSwitchBase< TypeSwitch< T, void >, T >::castValue(), TypeSwitch(), and llvm::detail::TypeSwitchBase< TypeSwitch< T, void >, T >::value.
|
inline |
As a default, invoke the given callable within the root value.
Definition at line 179 of file TypeSwitch.h.
References llvm::detail::TypeSwitchBase< TypeSwitch< T, void >, T >::value.
|
inline |
Declare default as unreachable, making sure that all cases were handled.
Definition at line 185 of file TypeSwitch.h.
References llvm_unreachable.
|
inlinenodiscard |
Definition at line 146 of file TypeSwitch.h.