Clang Project

clang_source_code/lib/Driver/ToolChains/AVR.h
1//===--- AVR.h - AVR Tool and 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_AVR_H
10#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AVR_H
11
12#include "Gnu.h"
13#include "InputInfo.h"
14#include "clang/Driver/ToolChain.h"
15#include "clang/Driver/Tool.h"
16
17namespace clang {
18namespace driver {
19namespace toolchains {
20
21class LLVM_LIBRARY_VISIBILITY AVRToolChain : public Generic_ELF {
22protected:
23  Tool *buildLinker() const override;
24public:
25  AVRToolChain(const Driver &D, const llvm::Triple &Triple,
26               const llvm::opt::ArgList &Args);
27};
28
29// end namespace toolchains
30
31namespace tools {
32namespace AVR {
33class LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
34public:
35  Linker(const ToolChain &TC) : GnuTool("AVR::Linker""avr-ld", TC) {}
36  bool hasIntegratedCPP() const override { return false; }
37  bool isLinkJob() const override { return true; }
38  void ConstructJob(Compilation &C, const JobAction &JA,
39                    const InputInfo &Output, const InputInfoList &Inputs,
40                    const llvm::opt::ArgList &TCArgs,
41                    const char *LinkingOutput) const override;
42};
43// end namespace AVR
44// end namespace tools
45// end namespace driver
46// end namespace clang
47
48#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_AVR_H
49