brintos

brintos / llvm-project-archived public Read only

0
0
Text · 891 B · 979a9d6 Raw
25 lines · c
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-exception6//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::nullopt19/// if no dialect was found, or if more than one potential dialect was found.20std::optional<Dialect> findDialectToGenerate(ArrayRef<Dialect> dialects);21} // namespace tblgen22} // namespace mlir23 24#endif // MLIR_TOOLS_MLIRTBLGEN_DIALECTGENUTILITIES_H_25