//===- Trait.h - Trait wrapper class ----------------------------*- 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 // //===----------------------------------------------------------------------===// // // Trait wrapper to simplify using TableGen Record defining an MLIR Trait. // //===----------------------------------------------------------------------===// #ifndef MLIR_TABLEGEN_TRAIT_H_ #define MLIR_TABLEGEN_TRAIT_H_ #include "mlir/Support/LLVM.h" #include "llvm/ADT/StringRef.h" #include <vector> namespace llvm { class Init; class Record; } // namespace llvm namespace mlir { namespace tblgen { class Interface; // Wrapper class with helper methods for accessing Trait constraints defined in // TableGen. class Trait { … }; // Trait corresponding to a native C++ Trait. class NativeTrait : public Trait { … }; // Trait corresponding to a predicate on the operation. class PredTrait : public Trait { … }; // Trait controlling op definition generator internals. class InternalTrait : public Trait { … }; // Trait corresponding to an OpInterface on the operation. class InterfaceTrait : public Trait { … }; } // namespace tblgen } // namespace mlir #endif // MLIR_TABLEGEN_TRAIT_H_