1//===- DialectGenUtilities.h - Utilities for dialect generation -----------===//
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#ifndef MLIR_TOOLS_MLIRTBLGEN_DIALECTGENUTILITIES_H_
10#define MLIR_TOOLS_MLIRTBLGEN_DIALECTGENUTILITIES_H_
11
12#include "mlir/Support/LLVM.h"
13
14namespace mlir {
15namespace tblgen {
16class Dialect;
17
18/// Find the dialect selected by the user to generate for. Returns std::nullopt
19/// if no dialect was found, or if more than one potential dialect was found.
20std::optional<Dialect> findDialectToGenerate(ArrayRef<Dialect> dialects);
21} // namespace tblgen
22} // namespace mlir
23
24#endif // MLIR_TOOLS_MLIRTBLGEN_DIALECTGENUTILITIES_H_
25

source code of mlir/tools/mlir-tblgen/DialectGenUtilities.h