1 //===-- MSP430TargetMachine.h - Define TargetMachine for MSP430 -*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
9 // This file declares the MSP430 specific subclass of TargetMachine.
11 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_MSP430_MSP430TARGETMACHINE_H
15 #define LLVM_LIB_TARGET_MSP430_MSP430TARGETMACHINE_H
17 #include "MSP430Subtarget.h"
18 #include "llvm/CodeGen/TargetFrameLowering.h"
19 #include "llvm/Target/TargetMachine.h"
23 /// MSP430TargetMachine
25 class MSP430TargetMachine
: public LLVMTargetMachine
{
26 std::unique_ptr
<TargetLoweringObjectFile
> TLOF
;
27 MSP430Subtarget Subtarget
;
30 MSP430TargetMachine(const Target
&T
, const Triple
&TT
, StringRef CPU
,
31 StringRef FS
, const TargetOptions
&Options
,
32 Optional
<Reloc::Model
> RM
, Optional
<CodeModel::Model
> CM
,
33 CodeGenOpt::Level OL
, bool JIT
);
34 ~MSP430TargetMachine() override
;
36 const MSP430Subtarget
*getSubtargetImpl(const Function
&F
) const override
{
39 TargetPassConfig
*createPassConfig(PassManagerBase
&PM
) override
;
41 TargetLoweringObjectFile
*getObjFileLowering() const override
{
44 }; // MSP430TargetMachine.
46 } // end namespace llvm