]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Driver/ToolChains/RISCV.h
Vendor import of clang trunk r338536:
[FreeBSD/FreeBSD.git] / lib / Driver / ToolChains / RISCV.h
1 //===--- RISCV.h - RISCV 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_RISCV_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_RISCV_H
12
13 #include "Gnu.h"
14 #include "clang/Driver/ToolChain.h"
15
16 namespace clang {
17 namespace driver {
18 namespace toolchains {
19
20 class LLVM_LIBRARY_VISIBILITY RISCVToolChain : public Generic_ELF {
21 public:
22   RISCVToolChain(const Driver &D, const llvm::Triple &Triple,
23                  const llvm::opt::ArgList &Args);
24
25   bool IsIntegratedAssemblerDefault() const override { return true; }
26   void
27   AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
28                             llvm::opt::ArgStringList &CC1Args) const override;
29   void
30   addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
31                            llvm::opt::ArgStringList &CC1Args) const override;
32
33 protected:
34   Tool *buildLinker() const override;
35 };
36
37 } // end namespace toolchains
38
39 namespace tools {
40 namespace RISCV {
41 class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
42 public:
43   Linker(const ToolChain &TC) : GnuTool("RISCV::Linker", "ld", TC) {}
44   bool hasIntegratedCPP() const override { return false; }
45   bool isLinkJob() const override { return true; }
46   void ConstructJob(Compilation &C, const JobAction &JA,
47                     const InputInfo &Output, const InputInfoList &Inputs,
48                     const llvm::opt::ArgList &TCArgs,
49                     const char *LinkingOutput) const override;
50 };
51 } // end namespace RISCV
52 } // end namespace tools
53
54 } // end namespace driver
55 } // end namespace clang
56
57 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_RISCV_H