Path: blob/main/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430TargetMachine.h
35267 views
//===-- MSP430TargetMachine.h - Define TargetMachine for MSP430 -*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file declares the MSP430 specific subclass of TargetMachine.9//10//===----------------------------------------------------------------------===//111213#ifndef LLVM_LIB_TARGET_MSP430_MSP430TARGETMACHINE_H14#define LLVM_LIB_TARGET_MSP430_MSP430TARGETMACHINE_H1516#include "MSP430Subtarget.h"17#include "llvm/Target/TargetMachine.h"18#include <optional>1920namespace llvm {21class StringRef;2223/// MSP430TargetMachine24///25class MSP430TargetMachine : public LLVMTargetMachine {26std::unique_ptr<TargetLoweringObjectFile> TLOF;27MSP430Subtarget Subtarget;2829public:30MSP430TargetMachine(const Target &T, const Triple &TT, StringRef CPU,31StringRef FS, const TargetOptions &Options,32std::optional<Reloc::Model> RM,33std::optional<CodeModel::Model> CM, CodeGenOptLevel OL,34bool JIT);35~MSP430TargetMachine() override;3637const MSP430Subtarget *getSubtargetImpl(const Function &F) const override {38return &Subtarget;39}40TargetPassConfig *createPassConfig(PassManagerBase &PM) override;4142TargetLoweringObjectFile *getObjFileLowering() const override {43return TLOF.get();44}4546MachineFunctionInfo *47createMachineFunctionInfo(BumpPtrAllocator &Allocator, const Function &F,48const TargetSubtargetInfo *STI) const override;49}; // MSP430TargetMachine.5051} // end namespace llvm5253#endif545556