Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/lib/Target/MSP430/MSP430TargetMachine.h
Line
Count
Source
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"
18
#include "llvm/CodeGen/TargetFrameLowering.h"
19
#include "llvm/Target/TargetMachine.h"
20
21
namespace llvm {
22
23
/// MSP430TargetMachine
24
///
25
class MSP430TargetMachine : public LLVMTargetMachine {
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,
32
                      Optional<Reloc::Model> RM, Optional<CodeModel::Model> CM,
33
                      CodeGenOpt::Level OL, bool JIT);
34
  ~MSP430TargetMachine() override;
35
36
2.98k
  const MSP430Subtarget *getSubtargetImpl(const Function &F) const override {
37
2.98k
    return &Subtarget;
38
2.98k
  }
39
  TargetPassConfig *createPassConfig(PassManagerBase &PM) override;
40
41
2.38k
  TargetLoweringObjectFile *getObjFileLowering() const override {
42
2.38k
    return TLOF.get();
43
2.38k
  }
44
}; // MSP430TargetMachine.
45
46
} // end namespace llvm
47
48
#endif