Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/lib/Driver/ToolChains/RISCVToolchain.h
Line
Count
Source (jump to first uncovered line)
1
//===--- RISCVToolchain.h - RISCV 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_RISCVTOOLCHAIN_H
10
#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_RISCVTOOLCHAIN_H
11
12
#include "Gnu.h"
13
#include "clang/Driver/ToolChain.h"
14
15
namespace clang {
16
namespace driver {
17
namespace toolchains {
18
19
class LLVM_LIBRARY_VISIBILITY RISCVToolChain : public Generic_ELF {
20
public:
21
  RISCVToolChain(const Driver &D, const llvm::Triple &Triple,
22
                 const llvm::opt::ArgList &Args);
23
24
721
  bool IsIntegratedAssemblerDefault() const override { return true; }
25
  void addClangTargetOptions(const llvm::opt::ArgList &DriverArgs,
26
                             llvm::opt::ArgStringList &CC1Args,
27
                             Action::OffloadKind) const override;
28
  void
29
  AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
30
                            llvm::opt::ArgStringList &CC1Args) const override;
31
  void
32
  addLibStdCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
33
                           llvm::opt::ArgStringList &CC1Args) const override;
34
35
protected:
36
  Tool *buildLinker() const override;
37
38
private:
39
  std::string computeSysRoot() const;
40
};
41
42
} // end namespace toolchains
43
44
namespace tools {
45
namespace RISCV {
46
class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
47
public:
48
29
  Linker(const ToolChain &TC) : GnuTool("RISCV::Linker", "ld", TC) {}
49
29
  bool hasIntegratedCPP() const override { return false; }
50
0
  bool isLinkJob() const override { return true; }
51
  void ConstructJob(Compilation &C, const JobAction &JA,
52
                    const InputInfo &Output, const InputInfoList &Inputs,
53
                    const llvm::opt::ArgList &TCArgs,
54
                    const char *LinkingOutput) const override;
55
};
56
} // end namespace RISCV
57
} // end namespace tools
58
59
} // end namespace driver
60
} // end namespace clang
61
62
#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_RISCVTOOLCHAIN_H