• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares interfaces for the 'test' dialect that can be used for
10 // testing the interface infrastructure.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MLIR_TEST_LIB_DIALECT_TEST_TESTINTERFACES_H
15 #define MLIR_TEST_LIB_DIALECT_TEST_TESTINTERFACES_H
16 
17 #include "mlir/Interfaces/SideEffectInterfaces.h"
18 
19 namespace mlir {
20 namespace TestEffects {
21 struct 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 
30 using EffectInstance = SideEffects::EffectInstance<Effect>;
31 
32 struct Concrete : public Effect::Base<Concrete> {};
33 
34 } // namespace TestEffects
35 } // namespace mlir
36 
37 #endif // MLIR_TEST_LIB_DIALECT_TEST_TESTINTERFACES_H
38