aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/Machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Target/Machine.h')
-rw-r--r--include/llvm/Target/Machine.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/Target/Machine.h b/include/llvm/Target/Machine.h
index 17ef288302..2f1fe52194 100644
--- a/include/llvm/Target/Machine.h
+++ b/include/llvm/Target/Machine.h
@@ -13,6 +13,7 @@
class TargetMachine;
class MachineInstrInfo;
+class MachineInstrDescriptor;
//---------------------------------------------------------------------------
// Data types used to define information about a single machine instruction
@@ -22,7 +23,6 @@ typedef int MachineOpCode;
typedef int OpCodeMask;
-
//---------------------------------------------------------------------------
// class TargetMachine
//
@@ -42,8 +42,8 @@ public:
// Register information. This needs to be reorganized into a single class.
int zeroRegNum; // register that gives 0 if any (-1 if none)
-public:
- TargetMachine(const string &targetname,
+protected:
+ TargetMachine(const string &targetname, // Can only create subclasses...
unsigned char PtrSize = 8, unsigned char PtrAl = 8,
unsigned char DoubleAl = 8, unsigned char FloatAl = 4,
unsigned char LongAl = 8, unsigned char IntAl = 4,
@@ -51,10 +51,11 @@ public:
: TargetName(targetname), DataLayout(targetname, PtrSize, PtrAl,
DoubleAl, FloatAl, LongAl, IntAl,
ShortAl, ByteAl) { }
+public:
virtual ~TargetMachine() {}
virtual const MachineInstrInfo& getInstrInfo() const = 0;
-
+
virtual unsigned int findOptimalStorageSize (const Type* ty) const;
// This really should be in the register info class