|
MLIR 22.0.0git
|
#include "mlir/Tools/PDLL/AST/Types.h"
Classes | |
| struct | Storage |
| class | TypeBase |
| This class provides several utilities when defining derived type classes. More... | |
Public Member Functions | |
| Type (Storage *impl=nullptr) | |
| bool | operator== (const Type &other) const |
| bool | operator!= (const Type &other) const |
| operator bool () const | |
| Storage * | getImpl () const |
| Return the internal storage instance of this type. | |
| TypeID | getTypeID () const |
| Return the TypeID instance of this type. | |
| void | print (raw_ostream &os) const |
| Print this type to the given stream. | |
| Type | refineWith (Type other) const |
| Try to refine this type with the one provided. | |
Protected Member Functions | |
| template<typename T> | |
| const T * | getImplAs () const |
| Return the internal storage instance of this type reinterpreted as the given derived storage type. | |
Definition at line 59 of file Types.h.
Referenced by mlir::pdll::ast::Type::TypeBase< ImplT, BaseT >::classof(), getTypeID(), operator!=(), operator==(), print(), and refineWith().
|
inline |
Return the internal storage instance of this type.
Definition at line 66 of file Types.h.
Referenced by llvm::CastInfo< To, From, std::enable_if_t< std::is_same_v< mlir::pdll::ast::Type, std::remove_const_t< From > >||std::is_base_of_v< mlir::pdll::ast::Type, From > > >::doCast(), llvm::DenseMapInfo< mlir::pdll::ast::Type >::getHashValue(), and mlir::pdll::ast::hash_value().
|
inlineprotected |
Return the internal storage instance of this type reinterpreted as the given derived storage type.
Definition at line 85 of file Types.h.
Referenced by mlir::pdll::ast::TupleType::getElementNames(), mlir::pdll::ast::RangeType::getElementType(), mlir::pdll::ast::TupleType::getElementTypes(), mlir::pdll::ast::OperationType::getName(), and mlir::pdll::ast::OperationType::getODSOperation().
| TypeID Type::getTypeID | ( | ) | const |
Return the TypeID instance of this type.
Definition at line 31 of file Types.cpp.
References getTypeID(), and Type().
Referenced by mlir::pdll::ast::Type::TypeBase< ImplT, BaseT >::classof(), and getTypeID().
|
inlineexplicit |
| void mlir::pdll::ast::Type::print | ( | raw_ostream & | os | ) | const |
Print this type to the given stream.
References Type().
Referenced by mlir::pdll::ast::operator<<().
Try to refine this type with the one provided.
Given two compatible types, this will return a merged type contains as much detail from the two types. For example, if refining two operation types and one contains a name, while the other doesn't, the refined type contains the name. If the two types are incompatible, null is returned.
Definition at line 33 of file Types.cpp.
References refineWith(), and Type().
Referenced by refineWith().