]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lib/Driver/ToolChains/MipsLinux.h
Vendor import of clang trunk r351319 (just before the release_80 branch
[FreeBSD/FreeBSD.git] / lib / Driver / ToolChains / MipsLinux.h
1 //===--- Mips.h - Mips 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_MIPS_LINUX_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
12
13 #include "Linux.h"
14 #include "clang/Driver/ToolChain.h"
15
16 namespace clang {
17 namespace driver {
18 namespace toolchains {
19
20 class LLVM_LIBRARY_VISIBILITY MipsLLVMToolChain : public Linux {
21 protected:
22   Tool *buildLinker() const override;
23
24 public:
25   MipsLLVMToolChain(const Driver &D, const llvm::Triple &Triple,
26                     const llvm::opt::ArgList &Args);
27
28   void
29   AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
30                             llvm::opt::ArgStringList &CC1Args) const override;
31
32   CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
33
34   void addLibCxxIncludePaths(
35       const llvm::opt::ArgList &DriverArgs,
36       llvm::opt::ArgStringList &CC1Args) const override;
37
38   void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
39                            llvm::opt::ArgStringList &CmdArgs) const override;
40
41   std::string getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
42                             bool Shared = false) const override;
43
44   std::string computeSysRoot() const override;
45
46   RuntimeLibType GetDefaultRuntimeLibType() const override {
47     return GCCInstallation.isValid() ? RuntimeLibType::RLT_Libgcc
48                                      : RuntimeLibType::RLT_CompilerRT;
49   }
50
51   const char *getDefaultLinker() const override {
52     return "ld.lld";
53   }
54
55 private:
56   Multilib SelectedMultilib;
57   std::string LibSuffix;
58 };
59
60 } // end namespace toolchains
61 } // end namespace driver
62 } // end namespace clang
63
64 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H