Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/lib/Driver/ToolChains/PS4CPU.h
Line
Count
Source (jump to first uncovered line)
1
//===--- PS4CPU.h - PS4CPU ToolChain Implementations ------------*- 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
#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_PS4CPU_H
10
#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_PS4CPU_H
11
12
#include "Gnu.h"
13
#include "clang/Driver/Tool.h"
14
#include "clang/Driver/ToolChain.h"
15
16
namespace clang {
17
namespace driver {
18
namespace tools {
19
20
namespace PS4cpu {
21
22
void addProfileRTArgs(const ToolChain &TC, const llvm::opt::ArgList &Args,
23
                      llvm::opt::ArgStringList &CmdArgs);
24
25
void addSanitizerArgs(const ToolChain &TC, llvm::opt::ArgStringList &CmdArgs);
26
27
class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
28
public:
29
  Assemble(const ToolChain &TC)
30
0
      : Tool("PS4cpu::Assemble", "assembler", TC, RF_Full) {}
31
32
0
  bool hasIntegratedCPP() const override { return false; }
33
34
  void ConstructJob(Compilation &C, const JobAction &JA,
35
                    const InputInfo &Output,
36
                    const InputInfoList &Inputs,
37
                    const llvm::opt::ArgList &TCArgs,
38
                    const char *LinkingOutput) const override;
39
};
40
41
class LLVM_LIBRARY_VISIBILITY Link : public Tool {
42
public:
43
44
  Link(const ToolChain &TC) : Tool("PS4cpu::Link", "linker", TC, RF_Full) {}
44
45
44
  bool hasIntegratedCPP() const override { return false; }
46
0
  bool isLinkJob() const override { return true; }
47
48
  void ConstructJob(Compilation &C, const JobAction &JA,
49
                    const InputInfo &Output,
50
                    const InputInfoList &Inputs,
51
                    const llvm::opt::ArgList &TCArgs,
52
                    const char *LinkingOutput) const override;
53
};
54
} // end namespace PS4cpu
55
} // namespace tools
56
57
namespace toolchains {
58
59
class LLVM_LIBRARY_VISIBILITY PS4CPU : public Generic_ELF {
60
public:
61
  PS4CPU(const Driver &D, const llvm::Triple &Triple,
62
         const llvm::opt::ArgList &Args);
63
64
  // No support for finding a C++ standard library yet.
65
  void addLibCxxIncludePaths(
66
      const llvm::opt::ArgList &DriverArgs,
67
0
      llvm::opt::ArgStringList &CC1Args) const override {}
68
  void addLibStdCxxIncludePaths(
69
      const llvm::opt::ArgList &DriverArgs,
70
9
      llvm::opt::ArgStringList &CC1Args) const override {}
71
72
116
  bool IsMathErrnoDefault() const override { return false; }
73
116
  bool IsObjCNonFragileABIDefault() const override { return true; }
74
  bool HasNativeLLVMSupport() const override;
75
  bool isPICDefault() const override;
76
77
116
  unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
78
116
    return 2; // SSPStrong
79
116
  }
80
81
116
  llvm::DebuggerKind getDefaultDebuggerTuning() const override {
82
116
    return llvm::DebuggerKind::SCE;
83
116
  }
84
85
  SanitizerMask getSupportedSanitizers() const override;
86
87
protected:
88
  Tool *buildAssembler() const override;
89
  Tool *buildLinker() const override;
90
};
91
92
} // end namespace toolchains
93
} // end namespace driver
94
} // end namespace clang
95
96
#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_PS4CPU_H