clang  6.0.0svn
PS4CPU.h
Go to the documentation of this file.
1 //===--- PS4CPU.h - PS4CPU ToolChain Implementations ------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_PS4CPU_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_PS4CPU_H
12 
13 #include "Gnu.h"
14 #include "clang/Driver/Tool.h"
15 #include "clang/Driver/ToolChain.h"
16 
17 namespace clang {
18 namespace driver {
19 namespace tools {
20 
21 namespace PS4cpu {
22 
23 void addProfileRTArgs(const ToolChain &TC, const llvm::opt::ArgList &Args,
24  llvm::opt::ArgStringList &CmdArgs);
25 
26 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
27 public:
28  Assemble(const ToolChain &TC)
29  : Tool("PS4cpu::Assemble", "assembler", TC, RF_Full) {}
30 
31  bool hasIntegratedCPP() const override { return false; }
32 
33  void ConstructJob(Compilation &C, const JobAction &JA,
34  const InputInfo &Output,
35  const InputInfoList &Inputs,
36  const llvm::opt::ArgList &TCArgs,
37  const char *LinkingOutput) const override;
38 };
39 
40 class LLVM_LIBRARY_VISIBILITY Link : public Tool {
41 public:
42  Link(const ToolChain &TC) : Tool("PS4cpu::Link", "linker", TC, RF_Full) {}
43 
44  bool hasIntegratedCPP() const override { return false; }
45  bool isLinkJob() const override { return true; }
46 
47  void ConstructJob(Compilation &C, const JobAction &JA,
48  const InputInfo &Output,
49  const InputInfoList &Inputs,
50  const llvm::opt::ArgList &TCArgs,
51  const char *LinkingOutput) const override;
52 };
53 } // end namespace PS4cpu
54 } // namespace tools
55 
56 namespace toolchains {
57 
58 class LLVM_LIBRARY_VISIBILITY PS4CPU : public Generic_ELF {
59 public:
60  PS4CPU(const Driver &D, const llvm::Triple &Triple,
61  const llvm::opt::ArgList &Args);
62 
63  // No support for finding a C++ standard library yet.
64  std::string findLibCxxIncludePath() const override { return ""; }
66  const llvm::opt::ArgList &DriverArgs,
67  llvm::opt::ArgStringList &CC1Args) const override {}
68 
69  bool IsMathErrnoDefault() const override { return false; }
70  bool IsObjCNonFragileABIDefault() const override { return true; }
71  bool HasNativeLLVMSupport() const override;
72  bool isPICDefault() const override;
73 
74  unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
75  return 2; // SSPStrong
76  }
77 
78  llvm::DebuggerKind getDefaultDebuggerTuning() const override {
79  return llvm::DebuggerKind::SCE;
80  }
81 
82  SanitizerMask getSupportedSanitizers() const override;
83 
84 protected:
85  Tool *buildAssembler() const override;
86  Tool *buildLinker() const override;
87 };
88 
89 } // end namespace toolchains
90 } // end namespace driver
91 } // end namespace clang
92 
93 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_PS4CPU_H
void addProfileRTArgs(const ToolChain &TC, const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs)
unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override
GetDefaultStackProtectorLevel - Get the default stack protector level for this tool chain (0=off...
Definition: PS4CPU.h:74
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:23
Assemble(const ToolChain &TC)
Definition: PS4CPU.h:28
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:65
void addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Definition: PS4CPU.h:65
llvm::DebuggerKind getDefaultDebuggerTuning() const override
Definition: PS4CPU.h:78
bool hasIntegratedCPP() const override
Definition: PS4CPU.h:31
Dataflow Directional Tag Classes.
uint64_t SanitizerMask
Definition: Sanitizers.h:24
bool IsObjCNonFragileABIDefault() const override
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.
Definition: PS4CPU.h:70
Tool - Information on a specific compilation tool.
Definition: Tool.h:34
bool IsMathErrnoDefault() const override
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Definition: PS4CPU.h:69
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:34
std::string findLibCxxIncludePath() const override
Definition: PS4CPU.h:64
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:73