MLIR  20.0.0git
Classes | Public Member Functions | Protected Attributes | List of all members
mlir::tblgen::Builder Class Reference

Wrapper class with helper methods for accessing Builders defined in TableGen. More...

#include "mlir/TableGen/Builder.h"

+ Inheritance diagram for mlir::tblgen::Builder:

Classes

class  Parameter
 This class represents a single parameter to a builder method. More...
 

Public Member Functions

 Builder (const llvm::Record *record, ArrayRef< SMLoc > loc)
 Construct a builder from the given Record instance. More...
 
ArrayRef< ParametergetParameters () const
 Return a list of parameters used in this build method. More...
 
std::optional< StringRef > getBody () const
 Return an optional string containing the body of the builder. More...
 
std::optional< StringRef > getDeprecatedMessage () const
 Return the deprecation message of the builder. More...
 

Protected Attributes

const llvm::Record * def
 The TableGen definition of this builder. More...
 

Detailed Description

Wrapper class with helper methods for accessing Builders defined in TableGen.

Definition at line 33 of file Builder.h.

Constructor & Destructor Documentation

◆ Builder()

mlir::tblgen::Builder::Builder ( const llvm::Record *  record,
ArrayRef< SMLoc >  loc 
)

Construct a builder from the given Record instance.

Member Function Documentation

◆ getBody()

std::optional< StringRef > Builder::getBody ( ) const

Return an optional string containing the body of the builder.

Definition at line 84 of file Builder.cpp.

References def.

◆ getDeprecatedMessage()

std::optional< StringRef > Builder::getDeprecatedMessage ( ) const

Return the deprecation message of the builder.

Empty optional if the builder is not deprecated.

Definition at line 89 of file Builder.cpp.

References def.

◆ getParameters()

ArrayRef<Parameter> mlir::tblgen::Builder::getParameters ( ) const
inline

Return a list of parameters used in this build method.

Definition at line 68 of file Builder.h.

Referenced by mlir::tblgen::AttrOrTypeDef::AttrOrTypeDef().

Member Data Documentation

◆ def

const llvm::Record* mlir::tblgen::Builder::def
protected

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