CIRCT
20.0.0git
|
This class implements the same functionality as TypeSwitch except that it uses firrtl::type_dyn_cast for dynamic cast. More...
#include <FIRRTLTypes.h>
Public Types | |
using | BaseT = llvm::detail::TypeSwitchBase< FIRRTLTypeSwitch< T, ResultT >, T > |
Public Member Functions | |
FIRRTLTypeSwitch (FIRRTLTypeSwitch &&other)=default | |
template<typename CaseT , typename CallableT > | |
FIRRTLTypeSwitch< T, ResultT > & | Case (CallableT &&caseFn) |
Add a case on the given type. More... | |
template<typename CallableT > | |
ResultT | Default (CallableT &&defaultFn) |
As a default, invoke the given callable within the root value. More... | |
ResultT | Default (ResultT defaultResult) |
As a default, return the given value. More... | |
operator ResultT () | |
Private Attributes | |
std::optional< ResultT > | result |
The pointer to the result of this switch statement, once known, null before that. More... | |
This class implements the same functionality as TypeSwitch except that it uses firrtl::type_dyn_cast for dynamic cast.
llvm::TypeSwitch is not customizable so this class currently duplicates the code.
Definition at line 519 of file FIRRTLTypes.h.
using circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::BaseT = llvm::detail::TypeSwitchBase<FIRRTLTypeSwitch<T, ResultT>, T> |
Definition at line 522 of file FIRRTLTypes.h.
|
default |
|
inline |
Add a case on the given type.
Definition at line 530 of file FIRRTLTypes.h.
References circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::result.
Referenced by ResolveTracesPass::buildTarget(), computeLoweringImpl(), containsBundleType(), createZeroValue(), getMaxFieldID(), circt::firrtl::getValueByFieldID(), circt::firrtl::hasZeroBitWidth(), isOneDimVectorType(), isTypeEmpty(), circt::firrtl::operator<<(), peelType(), resizeType(), ModuleNameSanitizer::rewrite(), SFCCompatPass::runOnOperation(), verifyNoInputProbes(), and circt::firrtl::walkGroundTypes().
|
inline |
As a default, invoke the given callable within the root value.
Definition at line 543 of file FIRRTLTypes.h.
References circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::result.
|
inline |
As a default, return the given value.
Definition at line 551 of file FIRRTLTypes.h.
References circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::result.
|
inline |
Definition at line 557 of file FIRRTLTypes.h.
References assert(), and circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::result.
|
private |
The pointer to the result of this switch statement, once known, null before that.
Definition at line 565 of file FIRRTLTypes.h.
Referenced by circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Case(), circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Default(), and circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::operator ResultT().