Fix uninitialized variable
[llvm-core.git] / lib / Target / Nios2 / Nios2TargetMachine.h
blob1ebfb397383e7b80cb010a7092e8a81c2f7821d6
1 //===-- Nios2TargetMachine.h - Define TargetMachine for Nios2 ---*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the Nios2 specific subclass of TargetMachine.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_NIOS2_NIOS2TARGETMACHINE_H
15 #define LLVM_LIB_TARGET_NIOS2_NIOS2TARGETMACHINE_H
17 #include "Nios2Subtarget.h"
18 #include "llvm/Target/TargetMachine.h"
20 namespace llvm {
21 class Nios2TargetMachine : public LLVMTargetMachine {
22 mutable StringMap<std::unique_ptr<Nios2Subtarget>> SubtargetMap;
23 std::unique_ptr<TargetLoweringObjectFile> TLOF;
24 Nios2Subtarget Subtarget;
26 public:
27 Nios2TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
28 StringRef FS, const TargetOptions &Options,
29 Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
30 CodeGenOpt::Level OL, bool JIT);
31 ~Nios2TargetMachine() override;
33 const Nios2Subtarget *getSubtargetImpl() const { return &Subtarget; }
34 const Nios2Subtarget *getSubtargetImpl(const Function &F) const override;
36 TargetLoweringObjectFile *getObjFileLowering() const override {
37 return TLOF.get();
40 // Pass Pipeline Configuration
41 TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
43 } // namespace llvm
45 #endif