blob: 88e35d6ff370a7b2f74c7963022abba3966e9af7 (
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
|
// $Id$ -*-c++-*-
//***************************************************************************
// class CompileContext
//
// Purpose:
// Holds the common option and target information for a compilation run.
//
// History:
// 07/15/01 - vadve - Created
//
//**************************************************************************/
#ifndef LLVM_LLC_COMPILECONTEXT_H
#define LLVM_LLC_COMPILECONTEXT_H
//************************** System Include Files **************************/
#include <string>
//*************************** User Include Files ***************************/
#include "llvm/Codegen/Sparc.h"
#include "llvm/LLC/LLCOptions.h"
//************************** Forward Declarations **************************/
class ProgramOptions;
class TargetMachine;
//---------------------------------------------------------------------------
// class CompileContext
//---------------------------------------------------------------------------
class CompileContext: public Unique
{
private:
LLCOptions* options;
TargetMachine* targetMachine;
public:
/*ctor*/ CompileContext (int argc, const char **argv, const char** envp);
/*dtor*/ virtual ~CompileContext ();
const LLCOptions& getOptions () const { return *options; }
const TargetMachine& getTarget () const { return *targetMachine; }
TargetMachine& getTarget () { return *targetMachine; }
};
inline
CompileContext::CompileContext(int argc, const char **argv, const char** envp)
{
options = new LLCOptions(argc, argv, envp);
targetMachine = new UltraSparc;
}
inline
CompileContext::~CompileContext()
{
delete options;
delete targetMachine;
}
//**************************************************************************/
#endif
|