40 lines · c
1//===- TestInterfaces.h - MLIR interfaces for testing -----------*- C++ -*-===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8//9// This file declares interfaces for the 'test' dialect that can be used for10// testing the interface infrastructure.11//12//===----------------------------------------------------------------------===//13 14#ifndef MLIR_TEST_LIB_DIALECT_TEST_TESTINTERFACES_H15#define MLIR_TEST_LIB_DIALECT_TEST_TESTINTERFACES_H16 17#include "mlir/Interfaces/SideEffectInterfaces.h"18 19namespace mlir {20namespace TestEffects {21struct Effect : public SideEffects::Effect {22 using SideEffects::Effect::Effect;23 24 template <typename Derived>25 using Base = SideEffects::Effect::Base<Derived, Effect>;26 27 static bool classof(const SideEffects::Effect *effect);28};29 30using EffectInstance = SideEffects::EffectInstance<Effect>;31 32struct Concrete : public Effect::Base<Concrete> {};33 34} // namespace TestEffects35} // namespace mlir36 37#include "TestOpInterfaces.h.inc"38 39#endif // MLIR_TEST_LIB_DIALECT_TEST_TESTINTERFACES_H40