clang  8.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 void addSanitizerArgs(const ToolChain &TC, llvm::opt::ArgStringList &CmdArgs);
27 
28 class LLVM_LIBRARY_VISIBILITY Assemble : public Tool {
29 public:
30  Assemble(const ToolChain &TC)
31  : Tool("PS4cpu::Assemble", "assembler", TC, RF_Full) {}
32 
33  bool hasIntegratedCPP() const override { return false; }
34 
35  void ConstructJob(Compilation &C, const JobAction &JA,
36  const InputInfo &Output,
37  const InputInfoList &Inputs,
38  const llvm::opt::ArgList &TCArgs,
39  const char *LinkingOutput) const override;
40 };
41 
42 class LLVM_LIBRARY_VISIBILITY Link : public Tool {
43 public:
44  Link(const ToolChain &TC) : Tool("PS4cpu::Link", "linker", TC, RF_Full) {}
45 
46  bool hasIntegratedCPP() const override { return false; }
47  bool isLinkJob() const override { return true; }
48 
49  void ConstructJob(Compilation &C, const JobAction &JA,
50  const InputInfo &Output,
51  const InputInfoList &Inputs,
52  const llvm::opt::ArgList &TCArgs,
53  const char *LinkingOutput) const override;
54 };
55 } // end namespace PS4cpu
56 } // namespace tools
57 
58 namespace toolchains {
59 
60 class LLVM_LIBRARY_VISIBILITY PS4CPU : public Generic_ELF {
61 public:
62  PS4CPU(const Driver &D, const llvm::Triple &Triple,
63  const llvm::opt::ArgList &Args);
64 
65  // No support for finding a C++ standard library yet.
67  const llvm::opt::ArgList &DriverArgs,
68  llvm::opt::ArgStringList &CC1Args) const override {}
70  const llvm::opt::ArgList &DriverArgs,
71  llvm::opt::ArgStringList &CC1Args) const override {}
72 
73  bool IsMathErrnoDefault() const override { return false; }
74  bool IsObjCNonFragileABIDefault() const override { return true; }
75  bool HasNativeLLVMSupport() const override;
76  bool isPICDefault() const override;
77 
78  unsigned GetDefaultStackProtectorLevel(bool KernelOrKext) const override {
79  return 2; // SSPStrong
80  }
81 
82  llvm::DebuggerKind getDefaultDebuggerTuning() const override {
83  return llvm::DebuggerKind::SCE;
84  }
85 
86  SanitizerMask getSupportedSanitizers() const override;
87 
88 protected:
89  Tool *buildAssembler() const override;
90  Tool *buildLinker() const override;
91 };
92 
93 } // end namespace toolchains
94 } // end namespace driver
95 } // end namespace clang
96 
97 #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:78
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:23
Assemble(const ToolChain &TC)
Definition: PS4CPU.h:30
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:59
void addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Definition: PS4CPU.h:69
llvm::DebuggerKind getDefaultDebuggerTuning() const override
Definition: PS4CPU.h:82
bool hasIntegratedCPP() const override
Definition: PS4CPU.h:33
void addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs, llvm::opt::ArgStringList &CC1Args) const override
Definition: PS4CPU.h:66
void addSanitizerArgs(const ToolChain &TC, llvm::opt::ArgStringList &CmdArgs)
Dataflow Directional Tag Classes.
bool IsObjCNonFragileABIDefault() const override
IsObjCNonFragileABIDefault - Does this tool chain set -fobjc-nonfragile-abi by default.
Definition: PS4CPU.h:74
Tool - Information on a specific compilation tool.
Definition: Tool.h:34
uint64_t SanitizerMask
Definition: Sanitizers.h:26
bool IsMathErrnoDefault() const override
IsMathErrnoDefault - Does this tool chain use -fmath-errno by default.
Definition: PS4CPU.h:73
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:46
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:88