clang  10.0.0svn
MipsLinux.h
Go to the documentation of this file.
1 //===--- Mips.h - Mips 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 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
10 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_MIPS_LINUX_H
11 
12 #include "Linux.h"
13 #include "clang/Driver/ToolChain.h"
14 
15 namespace clang {
16 namespace driver {
17 namespace toolchains {
18 
19 class LLVM_LIBRARY_VISIBILITY MipsLLVMToolChain : public Linux {
20 protected:
21  Tool *buildLinker() const override;
22 
23 public:
24  MipsLLVMToolChain(const Driver &D, const llvm::Triple &Triple,
25  const llvm::opt::ArgList &Args);
26 
27  void
28  AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
29  llvm::opt::ArgStringList &CC1Args) const override;
30 
31  CXXStdlibType GetCXXStdlibType(const llvm::opt::ArgList &Args) const override;
32 
33  void addLibCxxIncludePaths(
34  const llvm::opt::ArgList &DriverArgs,
35  llvm::opt::ArgStringList &CC1Args) const override;
36 
37  void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
38  llvm::opt::ArgStringList &CmdArgs) const override;
39 
40  std::string
41  getCompilerRT(const llvm::opt::ArgList &Args, StringRef Component,
42  FileType Type = ToolChain::FT_Static) const override;
43 
44  std::string computeSysRoot() const override;
45 
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
The base class of the type hierarchy.
Definition: Type.h:1436
RuntimeLibType GetDefaultRuntimeLibType() const override
GetDefaultRuntimeLibType - Get the default runtime library variant to use.
Definition: MipsLinux.h:46
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:59
const char * getDefaultLinker() const override
GetDefaultLinker - Get the default linker to use.
Definition: MipsLinux.h:51
This corresponds to a single GCC Multilib, or a segment of one controlled by a command line flag...
Definition: Multilib.h:28
Dataflow Directional Tag Classes.
Tool - Information on a specific compilation tool.
Definition: Tool.h:33