/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|*                                                                            *|
|* TypeDef Declarations                                                       *|
|*                                                                            *|
|* Automatically generated file, do not edit!                                 *|
|*                                                                            *|
\*===----------------------------------------------------------------------===*/

#ifdef GET_TYPEDEF_CLASSES
#undef GET_TYPEDEF_CLASSES


namespace mlir {
class AsmParser;
class AsmPrinter;
} // namespace mlir
namespace mlir::wasmssa {

/// Opaque type for function reference
class FuncRefType;
/// Opaque type for external reference
class ExternRefType;
/// Wasm limit type
class LimitType;
/// Type of a local variable
class LocalRefType;
/// Wasm table type
class TableType;
class FuncRefType : public ::mlir::Type::TypeBase<FuncRefType, ::mlir::Type, ::mlir::TypeStorage> {
public:
  using Base::Base;
  static constexpr ::llvm::StringLiteral name = "wasmssa.funcref";
  static constexpr ::llvm::StringLiteral dialectName = "wasmssa";
  static constexpr ::llvm::StringLiteral getMnemonic() {
    return {"funcref"};
  }

  static ::mlir::Type parse(::mlir::AsmParser &odsParser);
  void print(::mlir::AsmPrinter &odsPrinter) const;
};
class ExternRefType : public ::mlir::Type::TypeBase<ExternRefType, ::mlir::Type, ::mlir::TypeStorage> {
public:
  using Base::Base;
  static constexpr ::llvm::StringLiteral name = "wasmssa.externref";
  static constexpr ::llvm::StringLiteral dialectName = "wasmssa";
  static constexpr ::llvm::StringLiteral getMnemonic() {
    return {"externref"};
  }

};
namespace detail {

struct LimitTypeStorage;

} // namespace detail
class LimitType : public ::mlir::Type::TypeBase<LimitType, ::mlir::Type, detail::LimitTypeStorage> {
public:
  using Base::Base;
  static constexpr ::llvm::StringLiteral name = "wasmssa.limit";
  static constexpr ::llvm::StringLiteral dialectName = "wasmssa";
  static LimitType get(::mlir::MLIRContext *context, uint32_t min, std::optional<uint32_t> max);
  static constexpr ::llvm::StringLiteral getMnemonic() {
    return {"limit"};
  }

  static ::mlir::Type parse(::mlir::AsmParser &odsParser);
  void print(::mlir::AsmPrinter &odsPrinter) const;
  uint32_t getMin() const;
  std::optional<uint32_t> getMax() const;
};
namespace detail {

struct LocalRefTypeStorage;

} // namespace detail
class LocalRefType : public ::mlir::Type::TypeBase<LocalRefType, ::mlir::Type, detail::LocalRefTypeStorage> {
public:
  using Base::Base;
  static constexpr ::llvm::StringLiteral name = "wasmssa.local";
  static constexpr ::llvm::StringLiteral dialectName = "wasmssa";
  using Base::getChecked;
  static LocalRefType get(::mlir::MLIRContext *context, ::mlir::Type elementType);
  static LocalRefType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::mlir::Type elementType);
  static LocalRefType get(Type typeParam);
  static LocalRefType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, Type typeParam);
  static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType);
  static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type elementType);
  static constexpr ::llvm::StringLiteral getMnemonic() {
    return {"local"};
  }

  static ::mlir::Type parse(::mlir::AsmParser &odsParser);
  void print(::mlir::AsmPrinter &odsPrinter) const;
  ::mlir::Type getElementType() const;
};
namespace detail {

struct TableTypeStorage;

} // namespace detail
class TableType : public ::mlir::Type::TypeBase<TableType, ::mlir::Type, detail::TableTypeStorage> {
public:
  using Base::Base;
  static constexpr ::llvm::StringLiteral name = "wasmssa.tabletype";
  static constexpr ::llvm::StringLiteral dialectName = "wasmssa";
  using Base::getChecked;
  static TableType get(::mlir::MLIRContext *context, ::mlir::Type reference, ::mlir::wasmssa::LimitType limit);
  static TableType getChecked(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::MLIRContext *context, ::mlir::Type reference, ::mlir::wasmssa::LimitType limit);
  static ::llvm::LogicalResult verifyInvariantsImpl(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type reference, ::mlir::wasmssa::LimitType limit);
  static ::llvm::LogicalResult verifyInvariants(::llvm::function_ref<::mlir::InFlightDiagnostic()> emitError, ::mlir::Type reference, ::mlir::wasmssa::LimitType limit);
  static constexpr ::llvm::StringLiteral getMnemonic() {
    return {"tabletype"};
  }

  static ::mlir::Type parse(::mlir::AsmParser &odsParser);
  void print(::mlir::AsmPrinter &odsPrinter) const;
  ::mlir::Type getReference() const;
  ::mlir::wasmssa::LimitType getLimit() const;
};

} // namespace mlir::wasmssa
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::wasmssa::FuncRefType)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::wasmssa::ExternRefType)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::wasmssa::LimitType)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::wasmssa::LocalRefType)
MLIR_DECLARE_EXPLICIT_TYPE_ID(::mlir::wasmssa::TableType)

#endif // GET_TYPEDEF_CLASSES

