LLVM  10.0.0svn
MSP430TargetMachine.h
Go to the documentation of this file.
1 //===-- MSP430TargetMachine.h - Define TargetMachine for MSP430 -*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares the MSP430 specific subclass of TargetMachine.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 
14 #ifndef LLVM_LIB_TARGET_MSP430_MSP430TARGETMACHINE_H
15 #define LLVM_LIB_TARGET_MSP430_MSP430TARGETMACHINE_H
16 
17 #include "MSP430Subtarget.h"
20 
21 namespace llvm {
22 
23 /// MSP430TargetMachine
24 ///
26  std::unique_ptr<TargetLoweringObjectFile> TLOF;
27  MSP430Subtarget Subtarget;
28 
29 public:
30  MSP430TargetMachine(const Target &T, const Triple &TT, StringRef CPU,
31  StringRef FS, const TargetOptions &Options,
33  CodeGenOpt::Level OL, bool JIT);
34  ~MSP430TargetMachine() override;
35 
36  const MSP430Subtarget *getSubtargetImpl(const Function &F) const override {
37  return &Subtarget;
38  }
40 
42  return TLOF.get();
43  }
44 }; // MSP430TargetMachine.
45 
46 } // end namespace llvm
47 
48 #endif
This class represents lattice values for constants.
Definition: AllocatorList.h:23
F(f)
Target-Independent Code Generator Pass Configuration Options.
TargetLoweringObjectFile * getObjFileLowering() const override
This class describes a target machine that is implemented with the LLVM target-independent code gener...
MSP430TargetMachine.
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:43
PassManagerBase - An abstract interface to allow code to add passes to a pass manager without having ...
Target - Wrapper for Target specific information.
const MSP430Subtarget * getSubtargetImpl(const Function &F) const override
Virtual method implemented by subclasses that returns a reference to that target&#39;s TargetSubtargetInf...
TargetOptions Options
TargetPassConfig * createPassConfig(PassManagerBase &PM) override
Create a pass configuration object to be used by addPassToEmitX methods for generating a pipeline of ...
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:48
MSP430TargetMachine(const Target &T, const Triple &TT, StringRef CPU, StringRef FS, const TargetOptions &Options, Optional< Reloc::Model > RM, Optional< CodeModel::Model > CM, CodeGenOpt::Level OL, bool JIT)