blob: 56e963a5c7432d328aacea25357e1781b2822801 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
// $Id$ -*-c++-*-
//**************************************************************************/
// File:
// LLCOptions.h
//
// Purpose:
// Options for the llc compiler.
//
// History:
// 7/15/01 - Vikram Adve - Created
//
//**************************************************************************/
#ifndef LLVM_LLC_LLCOPTIONS_H
#define LLVM_LLC_LLCOPTIONS_H
//************************** System Include Files **************************/
#include <iostream.h>
#include <unistd.h>
//*************************** User Include Files ***************************/
#include "llvm/Support/ProgramOptions.h"
#include "llvm/Support/ProgramOption.h"
//************************ Option Name Definitions *************************/
const char* const HELP_OPT = "help";
const char* const DEBUG_OPT = "d";
const char* const QUIET_OPT = "q";
const char* const DEBUG_INSTR_SELECT_OPT= "debug_select";
const char* const OUTFILENAME_OPT = "o";
//---------------------------------------------------------------------------
// class LLCOptions
//---------------------------------------------------------------------------
class LLCOptions : public ProgramOptions {
public:
/*ctor*/ LLCOptions (int _argc,
const char* _argv[],
const char* _envp[]);
/*dtor*/ virtual ~LLCOptions ();
const string& getInputFileName() const { return inputFileName; }
const string& getOutputFileName() const { return outputFileName; }
protected:
//--------------------------------------------------------------------
// Initialize for all our compiler options (called by constructors).
//--------------------------------------------------------------------
void InitializeOptions();
//--------------------------------------------------------------------
// Make sure the parse went ok.
//--------------------------------------------------------------------
void CheckParse();
//--------------------------------------------------------------------
// Parse arguments after all options are consumed.
// This is called after a successful ParseArgs.
//--------------------------------------------------------------------
virtual void ParseExtraArgs();
//--------------------------------------------------------------------
// Print message describing which arguments and options are
// required, optional, mutually exclusive, ...
// called in ProgramOptions::Usage() method
//--------------------------------------------------------------------
virtual void PrintUsage(ostream& stream) const;
private:
string inputFileName;
string outputFileName;
};
//**************************************************************************/
#endif
|