DragonFly.h revision 341825
167760Smsmith//===--- DragonFly.h - DragonFly ToolChain Implementations ------*- C++ -*-===//
267760Smsmith//
367760Smsmith//                     The LLVM Compiler Infrastructure
467760Smsmith//
567760Smsmith// This file is distributed under the University of Illinois Open Source
667760Smsmith// License. See LICENSE.TXT for details.
767760Smsmith//
867760Smsmith//===----------------------------------------------------------------------===//
967760Smsmith
1067760Smsmith#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DRAGONFLY_H
1167760Smsmith#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DRAGONFLY_H
1267760Smsmith
1367760Smsmith#include "Gnu.h"
1467760Smsmith#include "clang/Driver/Tool.h"
1567760Smsmith#include "clang/Driver/ToolChain.h"
1667760Smsmith
1767760Smsmithnamespace clang {
1867760Smsmithnamespace driver {
1967760Smsmithnamespace tools {
2067760Smsmith/// dragonfly -- Directly call GNU Binutils assembler and linker
2167760Smsmithnamespace dragonfly {
2267760Smsmithclass LLVM_LIBRARY_VISIBILITY Assembler : public GnuTool {
2367760Smsmithpublic:
2467760Smsmith  Assembler(const ToolChain &TC)
2567760Smsmith      : GnuTool("dragonfly::Assembler", "assembler", TC) {}
2667760Smsmith
2767760Smsmith  bool hasIntegratedCPP() const override { return false; }
2867760Smsmith
2967760Smsmith  void ConstructJob(Compilation &C, const JobAction &JA,
3067760Smsmith                    const InputInfo &Output, const InputInfoList &Inputs,
3167760Smsmith                    const llvm::opt::ArgList &TCArgs,
32148318Snjl                    const char *LinkingOutput) const override;
33148318Snjl};
34148318Snjl
35128226Snjlclass LLVM_LIBRARY_VISIBILITY Linker : public GnuTool {
36128226Snjlpublic:
3767760Smsmith  Linker(const ToolChain &TC) : GnuTool("dragonfly::Linker", "linker", TC) {}
38128226Snjl
3967760Smsmith  bool hasIntegratedCPP() const override { return false; }
4067760Smsmith  bool isLinkJob() const override { return true; }
4167760Smsmith
42128226Snjl  void ConstructJob(Compilation &C, const JobAction &JA,
4367760Smsmith                    const InputInfo &Output, const InputInfoList &Inputs,
4467760Smsmith                    const llvm::opt::ArgList &TCArgs,
4577432Smsmith                    const char *LinkingOutput) const override;
4691128Smsmith};
4771875Smsmith} // end namespace dragonfly
48128226Snjl} // end namespace tools
4979000Smsmith
5067760Smsmithnamespace toolchains {
51128226Snjl
52138300Smarksclass LLVM_LIBRARY_VISIBILITY DragonFly : public Generic_ELF {
5367760Smsmithpublic:
5467760Smsmith  DragonFly(const Driver &D, const llvm::Triple &Triple,
5567760Smsmith            const llvm::opt::ArgList &Args);
5696926Speter
5771875Smsmith  bool IsMathErrnoDefault() const override { return false; }
5889054Smsmith
5979386Smsmithprotected:
6079386Smsmith  Tool *buildAssembler() const override;
6179386Smsmith  Tool *buildLinker() const override;
6279386Smsmith};
63128226Snjl
64128226Snjl} // end namespace toolchains
6567760Smsmith} // end namespace driver
66128226Snjl} // end namespace clang
6767760Smsmith
6867760Smsmith#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_DRAGONFLY_H
69128226Snjl