1 //===- TestInterfaces.h - MLIR interfaces for testing -----------*- C++ -*-===//
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-exception
7 //===----------------------------------------------------------------------===//
9 // This file declares interfaces for the 'test' dialect that can be used for
10 // testing the interface infrastructure.
12 //===----------------------------------------------------------------------===//
14 #ifndef MLIR_TEST_LIB_DIALECT_TEST_TESTINTERFACES_H
15 #define MLIR_TEST_LIB_DIALECT_TEST_TESTINTERFACES_H
17 #include "mlir/Interfaces/SideEffectInterfaces.h"
20 namespace TestEffects
{
21 struct Effect
: public SideEffects::Effect
{
22 using SideEffects::Effect::Effect
;
24 template <typename Derived
>
25 using Base
= SideEffects::Effect::Base
<Derived
, Effect
>;
27 static bool classof(const SideEffects::Effect
*effect
);
30 using EffectInstance
= SideEffects::EffectInstance
<Effect
>;
32 struct Concrete
: public Effect::Base
<Concrete
> {};
34 } // namespace TestEffects
37 #include "TestOpInterfaces.h.inc"
39 #endif // MLIR_TEST_LIB_DIALECT_TEST_TESTINTERFACES_H