[Transforms] Silence a warning in SROA.cpp (NFC)
[llvm-project.git] / clang / lib / Driver / ToolChains / Solaris.h
blob9ec83b773da448d1a829a63bd4291d21831043ab
1 //===--- Solaris.h - Solaris 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 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H
12 #include "Gnu.h"
13 #include "clang/Driver/Tool.h"
14 #include "clang/Driver/ToolChain.h"
16 namespace clang {
17 namespace driver {
18 namespace tools {
20 /// Directly call Solaris assembler and linker
21 namespace solaris {
22 class LLVM_LIBRARY_VISIBILITY Assembler final : public gnutools::Assembler {
23 public:
24 Assembler(const ToolChain &TC) : gnutools::Assembler(TC) {}
26 bool hasIntegratedCPP() const override { return false; }
28 void ConstructJob(Compilation &C, const JobAction &JA,
29 const InputInfo &Output, const InputInfoList &Inputs,
30 const llvm::opt::ArgList &TCArgs,
31 const char *LinkingOutput) const override;
34 bool isLinkerGnuLd(const ToolChain &TC, const llvm::opt::ArgList &Args);
36 class LLVM_LIBRARY_VISIBILITY Linker final : public Tool {
37 public:
38 Linker(const ToolChain &TC) : Tool("solaris::Linker", "linker", TC) {}
40 bool hasIntegratedCPP() const override { return false; }
41 bool isLinkJob() const override { return true; }
42 std::string getLinkerPath(const llvm::opt::ArgList &Args) const;
44 void ConstructJob(Compilation &C, const JobAction &JA,
45 const InputInfo &Output, const InputInfoList &Inputs,
46 const llvm::opt::ArgList &TCArgs,
47 const char *LinkingOutput) const override;
49 } // end namespace solaris
50 } // end namespace tools
52 namespace toolchains {
54 class LLVM_LIBRARY_VISIBILITY Solaris : public Generic_ELF {
55 public:
56 Solaris(const Driver &D, const llvm::Triple &Triple,
57 const llvm::opt::ArgList &Args);
59 void
60 AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
61 llvm::opt::ArgStringList &CC1Args) const override;
63 void
64 addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
65 llvm::opt::ArgStringList &CC1Args) const override;
67 SanitizerMask getSupportedSanitizers() const override;
69 const char *getDefaultLinker() const override;
71 protected:
72 Tool *buildAssembler() const override;
73 Tool *buildLinker() const override;
76 } // end namespace toolchains
77 } // end namespace driver
78 } // end namespace clang
80 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_SOLARIS_H