1//===- TestTraits.h - MLIR Test Traits --------------------------*- 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 contains traits defined by the TestDialect.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef MLIR_TESTTRAITS_H
14#define MLIR_TESTTRAITS_H
15
16#include "mlir/IR/Attributes.h"
17#include "mlir/IR/Types.h"
18
19namespace mlir {
20namespace TypeTrait {
21
22/// A trait defined on types for testing purposes.
23template <typename ConcreteType>
24class TestTypeTrait : public TypeTrait::TraitBase<ConcreteType, TestTypeTrait> {
25};
26
27} // namespace TypeTrait
28
29namespace AttributeTrait {
30
31/// A trait defined on attributes for testing purposes.
32template <typename ConcreteType>
33class TestAttrTrait
34 : public AttributeTrait::TraitBase<ConcreteType, TestAttrTrait> {};
35
36} // namespace AttributeTrait
37} // namespace mlir
38
39#endif // MLIR_TESTTRAITS_H
40

source code of mlir/test/lib/Dialect/Test/TestTraits.h