CIRCT  19.0.0git
Public Member Functions | Protected Types | List of all members
circt::moore::IndirectTypeBase< BaseTy > Class Template Reference

Common base class for name and type reference indirections. More...

#include <MooreTypes.h>

Inheritance diagram for circt::moore::IndirectTypeBase< BaseTy >:
Inheritance graph
[legend]
Collaboration diagram for circt::moore::IndirectTypeBase< BaseTy >:
Collaboration graph
[legend]

Public Member Functions

BaseTy getInner () const
 Get the type this indirection wraps. More...
 
Location getLoc () const
 Get the location in the source text where the indirection was generated. More...
 
BaseTy resolved () const
 Resolve one level of name or type reference indirection. More...
 
BaseTy fullyResolved () const
 Resolve all name or type reference indirections. More...
 

Protected Types

using InnerType = BaseTy
 
using Base = IndirectTypeBase< BaseTy >
 

Detailed Description

template<class BaseTy>
class circt::moore::IndirectTypeBase< BaseTy >

Common base class for name and type reference indirections.

These handle the cases where the source text uses a typedef or type(<decl>) construct to build a type. We keep track of these indirections alongside the location in the source text where they were created, in order to be able to reproduce the exact source text type in diagnostics.

We use this templated base class to construct separate packed and unpacked indirect types, where holding a packed indirect type guarantees that the inner type is a packed type as well. The resulting inheritance trees are:

Definition at line 674 of file MooreTypes.h.

Member Typedef Documentation

◆ Base

template<class BaseTy >
using circt::moore::IndirectTypeBase< BaseTy >::Base = IndirectTypeBase<BaseTy>
protected

Definition at line 678 of file MooreTypes.h.

◆ InnerType

template<class BaseTy >
using circt::moore::IndirectTypeBase< BaseTy >::InnerType = BaseTy
protected

Definition at line 676 of file MooreTypes.h.

Member Function Documentation

◆ fullyResolved()

template<class BaseTy >
BaseTy circt::moore::IndirectTypeBase< BaseTy >::fullyResolved ( ) const
inline

Resolve all name or type reference indirections.

This always returns the fully resolved inner type. See PackedType::fullyResolved and UnpackedType::fullyResolved.

Definition at line 697 of file MooreTypes.h.

References circt::moore::IndirectTypeBase< BaseTy >::getInner().

◆ getInner()

template<class BaseTy >
BaseTy circt::moore::IndirectTypeBase< BaseTy >::getInner ( ) const
inline

◆ getLoc()

template<class BaseTy >
Location circt::moore::IndirectTypeBase< BaseTy >::getLoc ( ) const
inline

Get the location in the source text where the indirection was generated.

Definition at line 687 of file MooreTypes.h.

References circt::moore::detail::getIndirectTypeLoc().

◆ resolved()

template<class BaseTy >
BaseTy circt::moore::IndirectTypeBase< BaseTy >::resolved ( ) const
inline

Resolve one level of name or type reference indirection.

This simply returns the inner type, which removes the name indirection introduced by this type. See PackedType::resolved and UnpackedType::resolved.

Definition at line 692 of file MooreTypes.h.

References circt::moore::IndirectTypeBase< BaseTy >::getInner().


The documentation for this class was generated from the following file: