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

namespace fir {
class FirAliasTagOpInterface;
namespace detail {
struct FirAliasTagOpInterfaceInterfaceTraits {
  struct Concept {
    /// The methods defined by the interface.
    mlir::ArrayAttr (*getTBAATagsOrNull)(const Concept *impl, ::mlir::Operation *);
    void (*setTBAATags)(const Concept *impl, ::mlir::Operation *, const mlir::ArrayAttr);
    ::llvm::SmallVector<::mlir::Value> (*getAccessedOperands)(const Concept *impl, ::mlir::Operation *);
  };
  template<typename ConcreteOp>
  class Model : public Concept {
  public:
    using Interface = ::fir::FirAliasTagOpInterface;
    Model() : Concept{getTBAATagsOrNull, setTBAATags, getAccessedOperands} {}

    static inline mlir::ArrayAttr getTBAATagsOrNull(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
    static inline void setTBAATags(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, const mlir::ArrayAttr attr);
    static inline ::llvm::SmallVector<::mlir::Value> getAccessedOperands(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
  };
  template<typename ConcreteOp>
  class FallbackModel : public Concept {
  public:
    using Interface = ::fir::FirAliasTagOpInterface;
    FallbackModel() : Concept{getTBAATagsOrNull, setTBAATags, getAccessedOperands} {}

    static inline mlir::ArrayAttr getTBAATagsOrNull(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
    static inline void setTBAATags(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, const mlir::ArrayAttr attr);
    static inline ::llvm::SmallVector<::mlir::Value> getAccessedOperands(const Concept *impl, ::mlir::Operation *tablegen_opaque_val);
  };
  template<typename ConcreteModel, typename ConcreteOp>
  class ExternalModel : public FallbackModel<ConcreteModel> {
  public:
    using ConcreteEntity = ConcreteOp;
    mlir::ArrayAttr getTBAATagsOrNull(::mlir::Operation *tablegen_opaque_val) const;
    void setTBAATags(::mlir::Operation *tablegen_opaque_val, const mlir::ArrayAttr attr) const;
    ::llvm::SmallVector<::mlir::Value> getAccessedOperands(::mlir::Operation *tablegen_opaque_val) const;
  };
};template <typename ConcreteOp>
struct FirAliasTagOpInterfaceTrait;

} // namespace detail
class FirAliasTagOpInterface : public ::mlir::OpInterface<FirAliasTagOpInterface, detail::FirAliasTagOpInterfaceInterfaceTraits> {
public:
  using ::mlir::OpInterface<FirAliasTagOpInterface, detail::FirAliasTagOpInterfaceInterfaceTraits>::OpInterface;
  template <typename ConcreteOp>
  struct Trait : public detail::FirAliasTagOpInterfaceTrait<ConcreteOp> {};
  /// Returns the tbaa attribute or nullptr
  mlir::ArrayAttr getTBAATagsOrNull();
  /// Sets the tbaa attribute
  void setTBAATags(const mlir::ArrayAttr attr);
  /// Returns a list of all pointer operands accessed by the operation
  ::llvm::SmallVector<::mlir::Value> getAccessedOperands();
};
namespace detail {
  template <typename ConcreteOp>
  struct FirAliasTagOpInterfaceTrait : public ::mlir::OpInterface<FirAliasTagOpInterface, detail::FirAliasTagOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
    /// Returns the tbaa attribute or nullptr
    mlir::ArrayAttr getTBAATagsOrNull() {
      auto op = mlir::cast<ConcreteOp>(this->getOperation());
        return op.getTbaaAttr();
    }
    /// Sets the tbaa attribute
    void setTBAATags(const mlir::ArrayAttr attr) {
      auto op = mlir::cast<ConcreteOp>(this->getOperation());
        op.setTbaaAttr(attr);
    }
    /// Returns a list of all pointer operands accessed by the operation
    ::llvm::SmallVector<::mlir::Value> getAccessedOperands() {
      auto op = mlir::cast<ConcreteOp>(this->getOperation());
        return {op.getMemref()};
    }
    static ::mlir::LogicalResult verifyTrait(::mlir::Operation *op) {
      return detail::verifyFirAliasTagOpInterface(op);
    }
  };
}// namespace detail
} // namespace fir
namespace fir {
template<typename ConcreteOp>
mlir::ArrayAttr detail::FirAliasTagOpInterfaceInterfaceTraits::Model<ConcreteOp>::getTBAATagsOrNull(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
  return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getTBAATagsOrNull();
}
template<typename ConcreteOp>
void detail::FirAliasTagOpInterfaceInterfaceTraits::Model<ConcreteOp>::setTBAATags(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, const mlir::ArrayAttr attr) {
  return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).setTBAATags(attr);
}
template<typename ConcreteOp>
::llvm::SmallVector<::mlir::Value> detail::FirAliasTagOpInterfaceInterfaceTraits::Model<ConcreteOp>::getAccessedOperands(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
  return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getAccessedOperands();
}
template<typename ConcreteOp>
mlir::ArrayAttr detail::FirAliasTagOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getTBAATagsOrNull(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
  return static_cast<const ConcreteOp *>(impl)->getTBAATagsOrNull(tablegen_opaque_val);
}
template<typename ConcreteOp>
void detail::FirAliasTagOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::setTBAATags(const Concept *impl, ::mlir::Operation *tablegen_opaque_val, const mlir::ArrayAttr attr) {
  return static_cast<const ConcreteOp *>(impl)->setTBAATags(tablegen_opaque_val, attr);
}
template<typename ConcreteOp>
::llvm::SmallVector<::mlir::Value> detail::FirAliasTagOpInterfaceInterfaceTraits::FallbackModel<ConcreteOp>::getAccessedOperands(const Concept *impl, ::mlir::Operation *tablegen_opaque_val) {
  return static_cast<const ConcreteOp *>(impl)->getAccessedOperands(tablegen_opaque_val);
}
template<typename ConcreteModel, typename ConcreteOp>
mlir::ArrayAttr detail::FirAliasTagOpInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getTBAATagsOrNull(::mlir::Operation *tablegen_opaque_val) const {
auto op = mlir::cast<ConcreteOp>(this->getOperation());
        return op.getTbaaAttr();
}
template<typename ConcreteModel, typename ConcreteOp>
void detail::FirAliasTagOpInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::setTBAATags(::mlir::Operation *tablegen_opaque_val, const mlir::ArrayAttr attr) const {
auto op = mlir::cast<ConcreteOp>(this->getOperation());
        op.setTbaaAttr(attr);
}
template<typename ConcreteModel, typename ConcreteOp>
::llvm::SmallVector<::mlir::Value> detail::FirAliasTagOpInterfaceInterfaceTraits::ExternalModel<ConcreteModel, ConcreteOp>::getAccessedOperands(::mlir::Operation *tablegen_opaque_val) const {
auto op = mlir::cast<ConcreteOp>(this->getOperation());
        return {op.getMemref()};
}
} // namespace fir
