MLIR  20.0.0git
GenNameParser.h
Go to the documentation of this file.
1 //===- GenNameParser.h - Command line parser for generators -----*- 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 // The GenNameParser class adds all passes linked in to the system that are
10 // creatable to the tool.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef MLIR_TABLEGEN_GENNAMEPARSER_H_
15 #define MLIR_TABLEGEN_GENNAMEPARSER_H_
16 
17 #include "llvm/Support/CommandLine.h"
18 
19 namespace mlir {
20 class GenInfo;
21 
22 /// Adds command line option for each registered generator.
23 struct GenNameParser : public llvm::cl::parser<const GenInfo *> {
24  GenNameParser(llvm::cl::Option &opt);
25 
26  void printOptionInfo(const llvm::cl::Option &o,
27  size_t globalWidth) const override;
28 };
29 } // namespace mlir
30 
31 #endif // MLIR_TABLEGEN_GENNAMEPARSER_H_
Include the generated interface declarations.
Adds command line option for each registered generator.
Definition: GenNameParser.h:23
GenNameParser(llvm::cl::Option &opt)
Definition: GenInfo.cpp:24
void printOptionInfo(const llvm::cl::Option &o, size_t globalWidth) const override
Definition: GenInfo.cpp:31