MLIR  20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::pdll::ast::TupleType Class Reference

This class represents a PDLL tuple type, i.e. More...

#include "mlir/Tools/PDLL/AST/Types.h"

+ Inheritance diagram for mlir::pdll::ast::TupleType:

Public Member Functions

ArrayRef< TypegetElementTypes () const
 Return the element types of this tuple. More...
 
ArrayRef< StringRef > getElementNames () const
 Return the element names of this tuple. More...
 
size_t size () const
 Return the number of elements within this tuple. More...
 
bool empty () const
 Return if the tuple has no elements. More...
 
- Public Member Functions inherited from mlir::pdll::ast::Type
 Type (Storage *impl=nullptr)
 
bool operator== (const Type &other) const
 
bool operator!= (const Type &other) const
 
 operator bool () const
 
template<typename U >
bool isa () const
 Provide type casting support. More...
 
template<typename U , typename V , typename... Others>
bool isa () const
 
template<typename U >
dyn_cast () const
 
template<typename U >
dyn_cast_or_null () const
 
template<typename U >
cast () const
 
StoragegetImpl () const
 Return the internal storage instance of this type. More...
 
TypeID getTypeID () const
 Return the TypeID instance of this type. More...
 
void print (raw_ostream &os) const
 Print this type to the given stream. More...
 
Type refineWith (Type other) const
 Try to refine this type with the one provided. More...
 

Static Public Member Functions

static TupleType get (Context &context, ArrayRef< Type > elementTypes, ArrayRef< StringRef > elementNames)
 Return an instance of the Tuple type. More...
 
static TupleType get (Context &context, ArrayRef< Type > elementTypes=std::nullopt)
 
- Static Public Member Functions inherited from mlir::pdll::ast::Type::TypeBase< detail::TupleTypeStorage >
static bool classof (Type type)
 Provide type casting support. More...
 

Additional Inherited Members

- Public Types inherited from mlir::pdll::ast::Type::TypeBase< detail::TupleTypeStorage >
using Base = TypeBase< detail::TupleTypeStorage, Type >
 
using ImplTy = detail::TupleTypeStorage
 
- Protected Member Functions inherited from mlir::pdll::ast::Type
template<typename T >
const T * getImplAs () const
 Return the internal storage instance of this type reinterpreted as the given derived storage type. More...
 

Detailed Description

This class represents a PDLL tuple type, i.e.

an ordered set of element types with optional names.

Definition at line 249 of file Types.h.

Member Function Documentation

◆ empty()

bool mlir::pdll::ast::TupleType::empty ( ) const
inline

Return if the tuple has no elements.

Definition at line 269 of file Types.h.

References size().

◆ get() [1/2]

TupleType TupleType::get ( Context context,
ArrayRef< Type elementTypes,
ArrayRef< StringRef >  elementNames 
)
static

Return an instance of the Tuple type.

Definition at line 142 of file Types.cpp.

References mlir::StorageUniquer::get(), and mlir::pdll::ast::Context::getTypeUniquer().

Referenced by mlir::pdll::ast::TupleExpr::create(), and get().

◆ get() [2/2]

TupleType TupleType::get ( Context context,
ArrayRef< Type elementTypes = std::nullopt 
)
static

Definition at line 148 of file Types.cpp.

References get().

◆ getElementNames()

ArrayRef< StringRef > TupleType::getElementNames ( ) const

Return the element names of this tuple.

Definition at line 157 of file Types.cpp.

◆ getElementTypes()

ArrayRef< Type > TupleType::getElementTypes ( ) const

Return the element types of this tuple.

Definition at line 153 of file Types.cpp.

Referenced by size().

◆ size()

size_t TupleType::size ( ) const
inline

Return the number of elements within this tuple.

Return the number of element types.

Definition at line 266 of file Types.h.

References getElementTypes().

Referenced by empty(), and mlir::pdll::ast::TupleExpr::getElements().


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