MLIR 22.0.0git
mlir::tblgen::TypeConstraint Class Reference

#include "mlir/TableGen/Type.h"

Inheritance diagram for mlir::tblgen::TypeConstraint:

Public Member Functions

 TypeConstraint (const llvm::DefInit *record)
bool isOptional () const
bool isVariadic () const
bool isVariadicOfVariadic () const
StringRef getVariadicOfVariadicSegmentSizeAttr () const
bool isVariableLength () const
std::optional< StringRef > getBuilderCall () const
StringRef getCppType () const
 Constraint (const llvm::Record *record, Kind kind)
 Constraint (const llvm::Record *record)
Public Member Functions inherited from mlir::tblgen::Constraint
 Constraint (const llvm::Record *record, Kind kind)
 Constraint (const llvm::Record *record)
bool operator== (const Constraint &that)
 Constraints are pointer-comparable.
bool operator!= (const Constraint &that)
Pred getPredicate () const
std::string getConditionTemplate () const
StringRef getSummary () const
StringRef getDescription () const
StringRef getDefName () const
 Returns the name of the TablGen def of this constraint.
std::string getUniqueDefName () const
 Returns a unique name for the TablGen def of this constraint.
std::optional< StringRef > getCppFunctionName () const
 Returns the name of the C++ function that should be generated for this constraint, or std::nullopt if no C++ function should be generated.
Kind getKind () const
const llvm::Record & getDef () const
 Return the underlying def.

Static Public Member Functions

static bool classof (const Constraint *c)

Additional Inherited Members

Public Types inherited from mlir::tblgen::Constraint
enum  Kind {
  CK_Attr , CK_Prop , CK_Region , CK_Successor ,
  CK_Type , CK_Uncategorized
}
Protected Attributes inherited from mlir::tblgen::Constraint
const llvm::Record * def

Detailed Description

Definition at line 30 of file Type.h.

Constructor & Destructor Documentation

◆ TypeConstraint()

TypeConstraint::TypeConstraint ( const llvm::DefInit * record)

Definition at line 22 of file Type.cpp.

References mlir::tblgen::Constraint::getDef(), and TypeConstraint().

Referenced by TypeConstraint().

Member Function Documentation

◆ classof()

bool mlir::tblgen::TypeConstraint::classof ( const Constraint * c)
inlinestatic

◆ Constraint() [1/2]

Constraint::Constraint ( const llvm::Record * record)

Definition at line 45 of file Constraint.cpp.

◆ Constraint() [2/2]

mlir::tblgen::Constraint::Constraint ( const llvm::Record * record,
Kind kind )
inline

Definition at line 43 of file Constraint.h.

Referenced by classof().

◆ getBuilderCall()

std::optional< StringRef > TypeConstraint::getBuilderCall ( ) const

Definition at line 44 of file Type.cpp.

References mlir::tblgen::Constraint::def, and isVariableLength().

◆ getCppType()

StringRef TypeConstraint::getCppType ( ) const

Definition at line 63 of file Type.cpp.

References mlir::tblgen::Constraint::def.

◆ getVariadicOfVariadicSegmentSizeAttr()

StringRef TypeConstraint::getVariadicOfVariadicSegmentSizeAttr ( ) const

Definition at line 37 of file Type.cpp.

References mlir::tblgen::Constraint::def, and isVariadicOfVariadic().

◆ isOptional()

bool TypeConstraint::isOptional ( ) const

Definition at line 25 of file Type.cpp.

References mlir::tblgen::Constraint::def.

Referenced by isVariableLength().

◆ isVariableLength()

bool mlir::tblgen::TypeConstraint::isVariableLength ( ) const
inline

◆ isVariadic()

bool TypeConstraint::isVariadic ( ) const

Definition at line 29 of file Type.cpp.

References mlir::tblgen::Constraint::def.

Referenced by isVariableLength().

◆ isVariadicOfVariadic()

bool TypeConstraint::isVariadicOfVariadic ( ) const

Definition at line 33 of file Type.cpp.

References mlir::tblgen::Constraint::def.

Referenced by getVariadicOfVariadicSegmentSizeAttr().


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