aboutsummaryrefslogtreecommitdiff
path: root/mlir/test/lib/Dialect/Test/TestTraits.h
blob: 309d77a29032cbfd9a70699d9a87e0cbf57cf804 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//===- TestTraits.h - MLIR Test Traits --------------------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file contains traits defined by the TestDialect.
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_TESTTRAITS_H
#define MLIR_TESTTRAITS_H

#include "mlir/IR/Attributes.h"
#include "mlir/IR/Types.h"

namespace mlir {
namespace TypeTrait {

/// A trait defined on types for testing purposes.
template <typename ConcreteType>
class TestTypeTrait : public TypeTrait::TraitBase<ConcreteType, TestTypeTrait> {
};

} // namespace TypeTrait

namespace AttributeTrait {

/// A trait defined on attributes for testing purposes.
template <typename ConcreteType>
class TestAttrTrait
    : public AttributeTrait::TraitBase<ConcreteType, TestAttrTrait> {};

} // namespace AttributeTrait
} // namespace mlir

#endif // MLIR_TESTTRAITS_H