1 //===- OptParserEmitter.h - Table Driven Command Line Parsing ---*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef UTILS_TABLEGEN_OPTPARSEREMITTER_H
11 #define UTILS_TABLEGEN_OPTPARSEREMITTER_H
13 #include "TableGenBackend.h"
16 /// OptParserEmitter - This tablegen backend takes an input .td file
17 /// describing a list of options and emits a data structure for parsing and
18 /// working with those options when given an input command line.
19 class OptParserEmitter : public TableGenBackend {
20 RecordKeeper &Records;
24 OptParserEmitter(RecordKeeper &R, bool _GenDefs)
25 : Records(R), GenDefs(_GenDefs) {}
27 /// run - Output the option parsing information.
29 /// \param GenHeader - Generate the header describing the option IDs.x
30 void run(raw_ostream &OS);