MLIR  15.0.0git
Public Member Functions | List of all members
mlir::DialectAsmPrinter Class Reference

This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom printAttribute/printType() method on a dialect. More...

#include "mlir/IR/DialectImplementation.h"

+ Inheritance diagram for mlir::DialectAsmPrinter:
+ Collaboration diagram for mlir::DialectAsmPrinter:

Public Member Functions

 ~DialectAsmPrinter () override
 
- Public Member Functions inherited from mlir::AsmPrinter
 AsmPrinter (Impl &impl)
 Initialize the printer with the given internal implementation. More...
 
virtual ~AsmPrinter ()
 
virtual raw_ostream & getStream () const
 Return the raw output stream used by this printer. More...
 
virtual void printFloat (const APFloat &value)
 Print the given floating point value in a stabilized form that can be roundtripped through the IR. More...
 
virtual void printType (Type type)
 
virtual void printAttribute (Attribute attr)
 
template<typename AttrOrType , std::enable_if_t< detect_has_print_method< AttrOrType >::value > * sfinae = nullptr>
void printStrippedAttrOrType (AttrOrType attrOrType)
 Print the provided attribute in the context of an operation custom printer/parser: this will invoke directly the print method on the attribute class and skip the #dialect.mnemonic prefix in most cases. More...
 
template<typename AttrOrType , std::enable_if_t<!detect_has_print_method< AttrOrType >::value > * sfinae = nullptr>
void printStrippedAttrOrType (AttrOrType attrOrType)
 SFINAE for printing the provided attribute in the context of an operation custom printer in the case where the attribute does not define a print method. More...
 
virtual void printAttributeWithoutType (Attribute attr)
 Print the given attribute without its type. More...
 
virtual void printKeywordOrString (StringRef keyword)
 Print the given string as a keyword, or a quoted and escaped string if it has any special or non-printable characters in it. More...
 
virtual void printSymbolName (StringRef symbolRef)
 Print the given string as a symbol reference, i.e. More...
 
template<typename TypeRange >
void printOptionalArrowTypeList (TypeRange &&types)
 Print an optional arrow followed by a type list. More...
 
template<typename TypeRange >
void printArrowTypeList (TypeRange &&types)
 
template<typename InputRangeT , typename ResultRangeT >
void printFunctionalType (InputRangeT &&inputs, ResultRangeT &&results)
 Print the two given type ranges in a functional form. More...
 

Additional Inherited Members

- Public Types inherited from mlir::AsmPrinter
template<typename AttrOrType >
using has_print_method = decltype(std::declval< AttrOrType >().print(std::declval< AsmPrinter & >()))
 Trait to check if AttrType provides a print method. More...
 
template<typename AttrOrType >
using detect_has_print_method = llvm::is_detected< has_print_method, AttrOrType >
 
- Protected Member Functions inherited from mlir::AsmPrinter
 AsmPrinter ()
 Initialize the printer with no internal implementation. More...
 

Detailed Description

This is a pure-virtual base class that exposes the asmprinter hooks necessary to implement a custom printAttribute/printType() method on a dialect.

Definition at line 28 of file DialectImplementation.h.

Constructor & Destructor Documentation

◆ ~DialectAsmPrinter()

DialectAsmPrinter::~DialectAsmPrinter ( )
overridedefault

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