summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.h
blob: 71ca2e900872b870279c0063a8dd5fca44c986fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//===--- Tools.h - Tool Implementations -------------------------*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef CLANG_LIB_DRIVER_TOOLS_H_
#define CLANG_LIB_DRIVER_TOOLS_H_

#include "clang/Driver/Tool.h"

#include "llvm/Support/Compiler.h"

namespace clang {
namespace driver {
namespace tools VISIBILITY_HIDDEN {

  class Clang : public Tool {
  public:
    Clang(const ToolChain &TC) : Tool(TC) {}

    virtual bool acceptsPipedInput() const { return true; }
    virtual bool canPipeOutput() const { return true; }
    virtual bool hasIntegratedCPP() const { return true; }
  };

  class GCC_Preprocess : public Tool {
  public:
    GCC_Preprocess(const ToolChain &TC) : Tool(TC) {}

    virtual bool acceptsPipedInput() const { return true; }
    virtual bool canPipeOutput() const { return true; }
    virtual bool hasIntegratedCPP() const { return false; }
  };

  class GCC_Precompile : public Tool  {
  public:
    GCC_Precompile(const ToolChain &TC) : Tool(TC) {}

    virtual bool acceptsPipedInput() const { return true; }
    virtual bool canPipeOutput() const { return false; }
    virtual bool hasIntegratedCPP() const { return true; }
  };

  class GCC_Compile : public Tool  {
  public:
    GCC_Compile(const ToolChain &TC) : Tool(TC) {}

    virtual bool acceptsPipedInput() const { return true; }
    virtual bool canPipeOutput() const { return true; }
    virtual bool hasIntegratedCPP() const { return true; }
  };

  class GCC_Assemble : public Tool  {
  public:
    GCC_Assemble(const ToolChain &TC) : Tool(TC) {}

    virtual bool acceptsPipedInput() const { return true; }
    virtual bool canPipeOutput() const { return false; }
    virtual bool hasIntegratedCPP() const { return false; }
  };

  class GCC_Link : public Tool  {
  public:
    GCC_Link(const ToolChain &TC) : Tool(TC) {}

    virtual bool acceptsPipedInput() const { return false; }
    virtual bool canPipeOutput() const { return false; }
    virtual bool hasIntegratedCPP() const { return false; }
  };

} // end namespace toolchains
} // end namespace driver
} // end namespace clang

#endif
OpenPOWER on IntegriCloud