1 //===- DialectGenUtilities.h - Utilities for dialect generation -----------===//
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
7 //===----------------------------------------------------------------------===//
9 #ifndef MLIR_TOOLS_MLIRTBLGEN_DIALECTGENUTILITIES_H_
10 #define MLIR_TOOLS_MLIRTBLGEN_DIALECTGENUTILITIES_H_
12 #include "mlir/Support/LLVM.h"
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.
20 std::optional
<Dialect
> findDialectToGenerate(ArrayRef
<Dialect
> dialects
);
24 #endif // MLIR_TOOLS_MLIRTBLGEN_DIALECTGENUTILITIES_H_