1. Use SubtargetFeatures in llc/lli.
[oota-llvm.git] / lib / Target / Skeleton / SkeletonTargetMachine.h
1 //===-- SkeletonTargetMachine.h - TargetMachine for Skeleton ----*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the Skeleton specific subclass of TargetMachine.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef SKELETONTARGETMACHINE_H
15 #define SKELETONTARGETMACHINE_H
16
17 #include "llvm/Target/TargetMachine.h"
18 #include "llvm/Target/TargetFrameInfo.h"
19 #include "llvm/PassManager.h"
20 #include "SkeletonInstrInfo.h"
21 #include "SkeletonJITInfo.h"
22
23 namespace llvm {
24   class IntrinsicLowering;
25
26   class SkeletonTargetMachine : public TargetMachine {
27     SkeletonInstrInfo InstrInfo;
28     TargetFrameInfo FrameInfo;
29     SkeletonJITInfo JITInfo;
30   public:
31     SkeletonTargetMachine(const Module &M, IntrinsicLowering *IL,
32                           const std::string &FS);
33
34     virtual const SkeletonInstrInfo *getInstrInfo() const { return &InstrInfo; }
35     virtual const TargetFrameInfo  *getFrameInfo() const { return &FrameInfo; }
36     virtual const MRegisterInfo *getRegisterInfo() const {
37       return &InstrInfo.getRegisterInfo();
38     }
39     virtual TargetJITInfo *getJITInfo() {
40       return &JITInfo;
41     }
42
43     virtual bool addPassesToEmitMachineCode(FunctionPassManager &PM,
44                                             MachineCodeEmitter &MCE);
45
46     virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
47                                      CodeGenFileType FileType);
48   };
49
50 } // end namespace llvm
51
52 #endif