Removal of the redundant CompileContext wrapper

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner
2001-07-23 03:09:03 +00:00
parent 0f68368fd8
commit 6c5a32d545
6 changed files with 42 additions and 89 deletions

View File

@@ -14,13 +14,13 @@
#include "llvm/Instruction.h"
#include <vector>
class CompileContext;
class Method;
class InstrForest;
class MachineInstr;
class InstructionNode;
class TmpInstruction;
class ConstPoolVal;
class TargetMachine;
//---------------------------------------------------------------------------
// GLOBAL data and an external function that must be implemented
@@ -32,7 +32,7 @@ const unsigned MAX_INSTR_PER_VMINSTR = 8;
extern unsigned GetInstructionsByRule (InstructionNode* subtreeRoot,
int ruleForNode,
short* nts,
CompileContext& ccontext,
TargetMachine &Target,
MachineInstr** minstrVec);
extern bool ThisIsAChainRule (int eruleno);
@@ -51,7 +51,7 @@ extern bool ThisIsAChainRule (int eruleno);
//---------------------------------------------------------------------------
bool SelectInstructionsForMethod (Method* method,
CompileContext& ccontext);
TargetMachine &Target);
// Debugging function to print the generated instructions

View File

@@ -1,35 +0,0 @@
// $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
#include "llvm/Support/Unique.h"
class TargetMachine;
//---------------------------------------------------------------------------
// class CompileContext
//---------------------------------------------------------------------------
class CompileContext: public Unique {
private:
TargetMachine* targetMachine;
public:
CompileContext(TargetMachine *Target) : targetMachine(Target) {}
~CompileContext();
const TargetMachine& getTarget () const { return *targetMachine; }
TargetMachine& getTarget () { return *targetMachine; }
};
#endif