clang  5.0.0
AMDGPU.h
Go to the documentation of this file.
1 //===--- AMDGPU.h - AMDGPU 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_AMDGPU_H
11 #define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPU_H
12 
13 #include "Gnu.h"
14 #include "clang/Driver/Tool.h"
15 #include "clang/Driver/ToolChain.h"
16 
17 namespace clang {
18 namespace driver {
19 namespace tools {
20 
21 namespace amdgpu {
22 
23 class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
24 public:
25  Linker(const ToolChain &TC) : GnuTool("amdgpu::Linker", "ld.lld", TC) {}
26  bool isLinkJob() const override { return true; }
27  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;
32 };
33 
34 } // end namespace amdgpu
35 } // end namespace tools
36 
37 namespace toolchains {
38 
39 class LLVM_LIBRARY_VISIBILITY AMDGPUToolChain : public Generic_ELF {
40 protected:
41  Tool *buildLinker() const override;
42 
43 public:
44  AMDGPUToolChain(const Driver &D, const llvm::Triple &Triple,
45  const llvm::opt::ArgList &Args);
46  unsigned GetDefaultDwarfVersion() const override { return 2; }
47  bool IsIntegratedAssemblerDefault() const override { return true; }
48 };
49 
50 } // end namespace toolchains
51 } // end namespace driver
52 } // end namespace clang
53 
54 #endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AMDGPU_H
bool isLinkJob() const override
Definition: AMDGPU.h:26
unsigned GetDefaultDwarfVersion() const override
Definition: AMDGPU.h:46
Linker(const ToolChain &TC)
Definition: AMDGPU.h:25
InputInfo - Wrapper for information about an input source.
Definition: InputInfo.h:23
Driver - Encapsulate logic for constructing compilation processes from a set of gcc-driver-like comma...
Definition: Driver.h:65
Base class for all GNU tools that provide the same behavior when it comes to response files support...
Definition: Gnu.h:41
Tool - Information on a specific compilation tool.
Definition: Tool.h:34
bool IsIntegratedAssemblerDefault() const override
IsIntegratedAssemblerDefault - Does this tool chain enable -integrated-as by default.
Definition: AMDGPU.h:47
Compilation - A set of tasks to perform for a single driver invocation.
Definition: Compilation.h:34
bool hasIntegratedCPP() const override
Definition: AMDGPU.h:27
ToolChain - Access to tools for a single platform.
Definition: ToolChain.h:50