/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |* *| |* Interface Declarations *| |* *| |* Automatically generated file, do not edit! *| |* *| \*===----------------------------------------------------------------------===*/ namespace mlir { /// This interface describes an attribute that may use a `Symbol`. This /// interface allows for users of symbols to hook into verification and other /// symbol related utilities that are either costly or otherwise disallowed /// within an operation (e.g., recreating symbol users per op verified rather /// than per symbol table, or querying symbols usage of sibblings). class SymbolUserAttrInterface; } // namespace mlir namespace mlir { /// This interface describes an attribute that may use a `Symbol`. This /// interface allows for users of symbols to hook into verification and other /// symbol related utilities that are either costly or otherwise disallowed /// within an operation (e.g., recreating symbol users per op verified rather /// than per symbol table, or querying symbols usage of sibblings). namespace detail { struct SymbolUserAttrInterfaceInterfaceTraits { struct Concept { /// The methods defined by the interface. ::llvm::LogicalResult (*verifySymbolUses)(const Concept *impl, ::mlir::Attribute , ::mlir::Operation *, ::mlir::SymbolTableCollection &); }; template class Model : public Concept { public: using Interface = ::mlir::SymbolUserAttrInterface; Model() : Concept{verifySymbolUses} {} static inline ::llvm::LogicalResult verifySymbolUses(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Operation * op, ::mlir::SymbolTableCollection & symbolTable); }; template class FallbackModel : public Concept { public: using Interface = ::mlir::SymbolUserAttrInterface; FallbackModel() : Concept{verifySymbolUses} {} static inline ::llvm::LogicalResult verifySymbolUses(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Operation * op, ::mlir::SymbolTableCollection & symbolTable); }; template class ExternalModel : public FallbackModel { public: using ConcreteEntity = ConcreteAttr; }; }; template struct SymbolUserAttrInterfaceTrait; } // namespace detail class SymbolUserAttrInterface : public ::mlir::AttributeInterface { public: using ::mlir::AttributeInterface::AttributeInterface; template struct Trait : public detail::SymbolUserAttrInterfaceTrait {}; /// Verify the symbol uses held by this attribute of this operation. ::llvm::LogicalResult verifySymbolUses(::mlir::Operation * op, ::mlir::SymbolTableCollection & symbolTable) const; }; } // namespace mlir namespace mlir::detail { template struct SymbolUserAttrInterfaceTrait : public ::mlir::AttributeInterface::Trait { }; } // namespace mlir::detail namespace mlir { template ::llvm::LogicalResult detail::SymbolUserAttrInterfaceInterfaceTraits::Model::verifySymbolUses(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Operation * op, ::mlir::SymbolTableCollection & symbolTable) { return (::llvm::cast(tablegen_opaque_val)).verifySymbolUses(op, symbolTable); } template ::llvm::LogicalResult detail::SymbolUserAttrInterfaceInterfaceTraits::FallbackModel::verifySymbolUses(const Concept *impl, ::mlir::Attribute tablegen_opaque_val, ::mlir::Operation * op, ::mlir::SymbolTableCollection & symbolTable) { return static_cast(impl)->verifySymbolUses(tablegen_opaque_val, op, symbolTable); } } // namespace mlir