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