MLIR  19.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()

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

Construct a builder from the given Record instance.

Definition at line 50 of file Builder.cpp.

References def.

Member Function Documentation

◆ getBody()

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

Return an optional string containing the body of the builder.

Definition at line 80 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 85 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: