TypeProvider class
#include <slang/ast/TypeProvider.h>
Interface for accessing simple types during AST construction.
Typically types will be constructed and uniquified via the Compilation class. This interface can be used to provide access to commonly used types in a way that is abstracted from the underlying Compilation instance.
Constructors, destructors, conversion operators
- TypeProvider(BumpAllocator& alloc)
- Constructs a new TypeProvider instance.
Public functions
- const Type& getBitType() const
- Get the built-in
bittype. - const Type& getLogicType() const
- Get the built-in
logictype. - const Type& getIntType() const
- Get the built-in
inttype. - const Type& getByteType() const
- Get the built-in
bytetype. - const Type& getIntegerType() const
- Get the built-in
integertype. - const Type& getRealType() const
- Get the built-in
realtype. - const Type& getShortRealType() const
- Get the built-in
shortrealtype. - const Type& getStringType() const
- Get the built-in
stringtype. - const Type& getVoidType() const
- Get the built-in
voidtype. - const Type& getErrorType() const
- Get the error type, which is used as a placeholder to represent an invalid type.
- const Type& getNullType() const
- Get the built-in
nulltype. - const Type& getUnboundedType() const
- Get the built-in
$type. - const Type& getTypeRefType() const
- Get the built-in type used for the result of the
type()operator. -
const Type& getType(bitwidth_
t width, bitmask<IntegralFlags> flags) const - Gets an integral vector type with the given size and flags.
- const Type& getScalarType(bitmask<IntegralFlags> flags) const
- Gets a scalar (single bit) type with the given flags.
Public variables
- BumpAllocator& alloc
- The allocator used for type construction.