Home | History | Annotate | Download | only in TableGen
      1 //===- 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 "llvm/TableGen/TableGenBackend.h"
     14 
     15 namespace 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
     35