• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 } // end namespace mlir
30 
31 #endif // MLIR_TABLEGEN_GENNAMEPARSER_H_
32