blob: 241a3f2b4a08bb06dec0ad3c855fe0aa33d660d0 [file] [log] [blame]
Daniel Dunbar2d6a8fb2009-11-18 21:29:51 +00001//===- OptParserEmitter.h - Table Driven Command Line Parsing ---*- C++ -*-===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9
10#ifndef UTILS_TABLEGEN_OPTPARSEREMITTER_H
11#define UTILS_TABLEGEN_OPTPARSEREMITTER_H
12
13#include "TableGenBackend.h"
14
15namespace llvm {
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;
21 bool GenDefs;
22
23 public:
24 OptParserEmitter(RecordKeeper &R, bool _GenDefs)
25 : Records(R), GenDefs(_GenDefs) {}
26
27 /// run - Output the option parsing information.
28 ///
29 /// \param GenHeader - Generate the header describing the option IDs.x
30 void run(raw_ostream &OS);
31 };
32}
33
34#endif