MLIR  19.0.0git
Public Types | Public Member Functions | Protected Attributes | List of all members
mlir::tblgen::Constraint Class Reference

#include "mlir/TableGen/Constraint.h"

+ Inheritance diagram for mlir::tblgen::Constraint:

Public Types

enum  Kind {
  CK_Attr , CK_Region , CK_Successor , CK_Type ,
  CK_Uncategorized
}
 

Public Member Functions

 Constraint (const llvm::Record *record, Kind kind)
 
 Constraint (const llvm::Record *record)
 
bool operator== (const Constraint &that)
 Constraints are pointer-comparable. More...
 
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. More...
 
std::string getUniqueDefName () const
 Returns a unique name for the TablGen def of this constraint. More...
 
Kind getKind () const
 
const llvm::Record & getDef () const
 Return the underlying def. More...
 

Protected Attributes

const llvm::Record * def
 

Detailed Description

Definition at line 30 of file Constraint.h.

Member Enumeration Documentation

◆ Kind

Enumerator
CK_Attr 
CK_Region 
CK_Successor 
CK_Type 
CK_Uncategorized 

Definition at line 33 of file Constraint.h.

Constructor & Destructor Documentation

◆ Constraint() [1/2]

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

Definition at line 36 of file Constraint.h.

◆ Constraint() [2/2]

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

Definition at line 19 of file Constraint.cpp.

References CK_Attr, CK_Region, CK_Successor, CK_Type, and def.

Member Function Documentation

◆ getConditionTemplate()

std::string Constraint::getConditionTemplate ( ) const

◆ getDef()

const llvm::Record& mlir::tblgen::Constraint::getDef ( ) const
inline

Return the underlying def.

Definition at line 75 of file Constraint.h.

References def.

◆ getDefName()

StringRef Constraint::getDefName ( ) const

Returns the name of the TablGen def of this constraint.

In some cases where the current def is anonymous, the name of the base def is used (e.g. std::optional<>/Variadic<> type constraints).

Definition at line 66 of file Constraint.cpp.

References def.

◆ getDescription()

StringRef Constraint::getDescription ( ) const

Definition at line 62 of file Constraint.cpp.

References def.

◆ getKind()

Kind mlir::tblgen::Constraint::getKind ( ) const
inline

◆ getPredicate()

Pred Constraint::getPredicate ( ) const

Definition at line 39 of file Constraint.cpp.

References def.

Referenced by getConditionTemplate(), and mlir::tblgen::NamedTypeConstraint::hasPredicate().

◆ getSummary()

StringRef Constraint::getSummary ( ) const

Definition at line 55 of file Constraint.cpp.

References def.

◆ getUniqueDefName()

std::string Constraint::getUniqueDefName ( ) const

Returns a unique name for the TablGen def of this constraint.

This is generally just the name of the def, but in some cases where the current def is anonymous, the name of the base def is attached (to provide more context on the def).

Definition at line 72 of file Constraint.cpp.

References def.

◆ operator!=()

bool mlir::tblgen::Constraint::operator!= ( const Constraint that)
inline

Definition at line 42 of file Constraint.h.

References def.

◆ operator==()

bool mlir::tblgen::Constraint::operator== ( const Constraint that)
inline

Constraints are pointer-comparable.

Definition at line 41 of file Constraint.h.

References def.

Member Data Documentation

◆ def

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

Definition at line 79 of file Constraint.h.

Referenced by Constraint(), mlir::tblgen::EnumAttr::genSpecializedAttr(), mlir::tblgen::EnumAttr::getAllCases(), mlir::tblgen::Attribute::getAttrDefName(), mlir::tblgen::Attribute::getBaseAttr(), mlir::tblgen::EnumAttr::getBaseAttrClass(), mlir::tblgen::TypeConstraint::getBuilderCall(), mlir::tblgen::Attribute::getConstBuilderTemplate(), mlir::tblgen::Attribute::getConvertFromStorageCall(), mlir::tblgen::TypeConstraint::getCPPClassName(), mlir::tblgen::EnumAttr::getCppNamespace(), mlir::tblgen::Attribute::getDef(), mlir::tblgen::EnumAttrCase::getDef(), getDef(), mlir::tblgen::Attribute::getDefaultValue(), getDefName(), mlir::tblgen::Attribute::getDerivedCodeBody(), getDescription(), mlir::tblgen::EnumAttr::getEnumClassName(), mlir::tblgen::EnumAttr::getMaxEnumValFnName(), getPredicate(), mlir::tblgen::Attribute::getReturnType(), mlir::tblgen::EnumAttr::getSpecializedAttrClassName(), mlir::tblgen::Attribute::getStorageType(), mlir::tblgen::EnumAttrCase::getStr(), mlir::tblgen::EnumAttr::getStringToSymbolFnName(), getSummary(), mlir::tblgen::EnumAttrCase::getSymbol(), mlir::tblgen::EnumAttr::getSymbolToStringFnName(), mlir::tblgen::EnumAttr::getSymbolToStringFnRetType(), mlir::tblgen::EnumAttr::getUnderlyingToSymbolFnName(), mlir::tblgen::EnumAttr::getUnderlyingType(), getUniqueDefName(), mlir::tblgen::EnumAttrCase::getValue(), mlir::tblgen::Attribute::getValueType(), mlir::tblgen::TypeConstraint::getVariadicOfVariadicSegmentSizeAttr(), mlir::tblgen::Attribute::hasDefaultValue(), mlir::tblgen::Attribute::isConstBuildable(), mlir::tblgen::TypeConstraint::isOptional(), mlir::tblgen::AttrConstraint::isSubClassOf(), mlir::tblgen::Attribute::isSymbolRefAttr(), mlir::tblgen::Region::isVariadic(), mlir::tblgen::Successor::isVariadic(), mlir::tblgen::TypeConstraint::isVariadic(), mlir::tblgen::TypeConstraint::isVariadicOfVariadic(), operator!=(), operator==(), and mlir::tblgen::EnumAttr::printBitEnumPrimaryGroups().


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