mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 06:32:24 +00:00
7e583cfafe
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253 91177308-0d34-0410-b5e6-96231b3b80d8
70 lines
1.7 KiB
C++
70 lines
1.7 KiB
C++
// $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
|