//===- PDLTypes.cpp - Pattern Descriptor Language Types -------------------===// // // 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 // //===----------------------------------------------------------------------===// #include "mlir/Dialect/PDL/IR/PDLTypes.h" #include "mlir/Dialect/PDL/IR/PDL.h" #include "mlir/IR/Builders.h" #include "mlir/IR/DialectImplementation.h" #include "llvm/ADT/TypeSwitch.h" usingnamespacemlir; usingnamespacemlir::pdl; //===----------------------------------------------------------------------===// // TableGen'd type method definitions //===----------------------------------------------------------------------===// #define GET_TYPEDEF_CLASSES #include "mlir/Dialect/PDL/IR/PDLOpsTypes.cpp.inc" //===----------------------------------------------------------------------===// // PDLDialect //===----------------------------------------------------------------------===// void PDLDialect::registerTypes() { … } static Type parsePDLType(AsmParser &parser) { … } //===----------------------------------------------------------------------===// // PDL Types //===----------------------------------------------------------------------===// bool PDLType::classof(Type type) { … } Type pdl::getRangeElementTypeOrSelf(Type type) { … } //===----------------------------------------------------------------------===// // RangeType //===----------------------------------------------------------------------===// Type RangeType::parse(AsmParser &parser) { … } void RangeType::print(AsmPrinter &printer) const { … } LogicalResult RangeType::verify(function_ref<InFlightDiagnostic()> emitError, Type elementType) { … }