40 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8//9// This file contains traits defined by the TestDialect.10//11//===----------------------------------------------------------------------===//12 13#ifndef MLIR_TESTTRAITS_H14#define MLIR_TESTTRAITS_H15 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 TypeTrait28 29namespace AttributeTrait {30 31/// A trait defined on attributes for testing purposes.32template <typename ConcreteType>33class TestAttrTrait34 : public AttributeTrait::TraitBase<ConcreteType, TestAttrTrait> {};35 36} // namespace AttributeTrait37} // namespace mlir38 39#endif // MLIR_TESTTRAITS_H40