Fixing a bunch of -Woverloaded-virtual warnings due to hiding getSubtargetImpl from...
[oota-llvm.git] / lib / Target / SystemZ / SystemZTargetMachine.h
index c8b924259a94364b1f3a8ea42030eaf32798da3f..45ff61f6b78c9af5e5e3c98ee86953fbb88e0122 100644 (file)
 //===----------------------------------------------------------------------===//
 
 
-#ifndef SYSTEMZTARGETMACHINE_H
-#define SYSTEMZTARGETMACHINE_H
+#ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
+#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZTARGETMACHINE_H
 
-#include "SystemZFrameLowering.h"
-#include "SystemZISelLowering.h"
-#include "SystemZInstrInfo.h"
-#include "SystemZRegisterInfo.h"
-#include "SystemZSelectionDAGInfo.h"
 #include "SystemZSubtarget.h"
-#include "llvm/IR/DataLayout.h"
-#include "llvm/Target/TargetFrameLowering.h"
 #include "llvm/Target/TargetMachine.h"
 
 namespace llvm {
 
+class TargetFrameLowering;
+
 class SystemZTargetMachine : public LLVMTargetMachine {
   SystemZSubtarget        Subtarget;
-  const DataLayout        DL;
-  SystemZInstrInfo        InstrInfo;
-  SystemZTargetLowering   TLInfo;
-  SystemZSelectionDAGInfo TSInfo;
-  SystemZFrameLowering    FrameLowering;
 
 public:
   SystemZTargetMachine(const Target &T, StringRef TT, StringRef CPU,
@@ -42,30 +32,12 @@ public:
                        CodeGenOpt::Level OL);
 
   // Override TargetMachine.
-  virtual const TargetFrameLowering *getFrameLowering() const override {
-    return &FrameLowering;
-  }
-  virtual const SystemZInstrInfo *getInstrInfo() const override {
-    return &InstrInfo;
-  }
-  virtual const SystemZSubtarget *getSubtargetImpl() const override {
+  using LLVMTargetMachine::getSubtargetImpl;
+  const SystemZSubtarget *getSubtargetImpl() const override {
     return &Subtarget;
   }
-  virtual const DataLayout *getDataLayout() const override {
-    return &DL;
-  }
-  virtual const SystemZRegisterInfo *getRegisterInfo() const override {
-    return &InstrInfo.getRegisterInfo();
-  }
-  virtual const SystemZTargetLowering *getTargetLowering() const override {
-    return &TLInfo;
-  }
-  virtual const TargetSelectionDAGInfo *getSelectionDAGInfo() const override {
-    return &TSInfo;
-  }
-
   // Override LLVMTargetMachine
-  virtual TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
+  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
 };
 
 } // end namespace llvm