Fix GCC build problem with 288f05f related to SmallVector. (#116958)
[llvm-project.git] / mlir / test / lib / Dialect / Test / TestTraits.h
blob309d77a29032cbfd9a70699d9a87e0cbf57cf804
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.
11 //===----------------------------------------------------------------------===//
13 #ifndef MLIR_TESTTRAITS_H
14 #define MLIR_TESTTRAITS_H
16 #include "mlir/IR/Attributes.h"
17 #include "mlir/IR/Types.h"
19 namespace mlir {
20 namespace TypeTrait {
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>
33 class TestAttrTrait
34 : public AttributeTrait::TraitBase<ConcreteType, TestAttrTrait> {};
36 } // namespace AttributeTrait
37 } // namespace mlir
39 #endif // MLIR_TESTTRAITS_H