MLIR  19.0.0git
PDLTypes.h
Go to the documentation of this file.
1 //===- PDLTypes.h - Pattern Descriptor Language Types -----------*- 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 defines the types for the Pattern Descriptor Language dialect.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef MLIR_DIALECT_PDL_IR_PDLTYPES_H_
14 #define MLIR_DIALECT_PDL_IR_PDLTYPES_H_
15 
16 #include "mlir/IR/Types.h"
17 
18 //===----------------------------------------------------------------------===//
19 // PDL Dialect Types
20 //===----------------------------------------------------------------------===//
21 
22 namespace mlir {
23 namespace pdl {
24 /// This class represents the base class of all PDL types.
25 class PDLType : public Type {
26 public:
27  using Type::Type;
28 
29  static bool classof(Type type);
30 };
31 
32 /// If the given type is a range, return its element type, otherwise return
33 /// the type itself.
35 
36 } // namespace pdl
37 } // namespace mlir
38 
39 #define GET_TYPEDEF_CLASSES
40 #include "mlir/Dialect/PDL/IR/PDLOpsTypes.h.inc"
41 
42 #endif // MLIR_DIALECT_PDL_IR_PDLTYPES_H_
Instances of the Type class are uniqued, have an immutable identifier and an optional mutable compone...
Definition: Types.h:74
constexpr Type()=default
This class represents the base class of all PDL types.
Definition: PDLTypes.h:25
static bool classof(Type type)
Definition: PDLTypes.cpp:58
Type getRangeElementTypeOrSelf(Type type)
If the given type is a range, return its element type, otherwise return the type itself.
Definition: PDLTypes.cpp:62
Include the generated interface declarations.