blob: 6aaa04051f09f3f36f790dc9c63c2ad877c64829 [file] [log] [blame]
Daniel Dunbar542fae92009-03-17 22:07:58 +00001//===--- Tools.h - Tool 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 CLANG_LIB_DRIVER_TOOLS_H_
11#define CLANG_LIB_DRIVER_TOOLS_H_
12
13#include "clang/Driver/Tool.h"
14
15#include "llvm/Support/Compiler.h"
16
17namespace clang {
18namespace driver {
Daniel Dunbar7c764122009-03-17 22:18:43 +000019namespace tools {
Daniel Dunbar542fae92009-03-17 22:07:58 +000020
Daniel Dunbar7c764122009-03-17 22:18:43 +000021 class VISIBILITY_HIDDEN Clang : public Tool {
Daniel Dunbar542fae92009-03-17 22:07:58 +000022 public:
Daniel Dunbareed1b422009-03-17 22:45:24 +000023 Clang(const ToolChain &TC) : Tool("clang", TC) {}
Daniel Dunbar542fae92009-03-17 22:07:58 +000024
25 virtual bool acceptsPipedInput() const { return true; }
26 virtual bool canPipeOutput() const { return true; }
27 virtual bool hasIntegratedCPP() const { return true; }
28 };
29
Daniel Dunbareed1b422009-03-17 22:45:24 +000030 /// gcc - Generic GCC tool implementations.
31namespace gcc {
32 class VISIBILITY_HIDDEN Preprocess : public Tool {
Daniel Dunbar542fae92009-03-17 22:07:58 +000033 public:
Daniel Dunbareed1b422009-03-17 22:45:24 +000034 Preprocess(const ToolChain &TC) : Tool("gcc::Preprocess", TC) {}
Daniel Dunbar542fae92009-03-17 22:07:58 +000035
36 virtual bool acceptsPipedInput() const { return true; }
37 virtual bool canPipeOutput() const { return true; }
38 virtual bool hasIntegratedCPP() const { return false; }
39 };
40
Daniel Dunbareed1b422009-03-17 22:45:24 +000041 class VISIBILITY_HIDDEN Precompile : public Tool {
Daniel Dunbar542fae92009-03-17 22:07:58 +000042 public:
Daniel Dunbareed1b422009-03-17 22:45:24 +000043 Precompile(const ToolChain &TC) : Tool("gcc::Precompile", TC) {}
Daniel Dunbar542fae92009-03-17 22:07:58 +000044
45 virtual bool acceptsPipedInput() const { return true; }
46 virtual bool canPipeOutput() const { return false; }
47 virtual bool hasIntegratedCPP() const { return true; }
48 };
49
Daniel Dunbareed1b422009-03-17 22:45:24 +000050 class VISIBILITY_HIDDEN Compile : public Tool {
Daniel Dunbar542fae92009-03-17 22:07:58 +000051 public:
Daniel Dunbareed1b422009-03-17 22:45:24 +000052 Compile(const ToolChain &TC) : Tool("gcc::Compile", TC) {}
Daniel Dunbar542fae92009-03-17 22:07:58 +000053
54 virtual bool acceptsPipedInput() const { return true; }
55 virtual bool canPipeOutput() const { return true; }
56 virtual bool hasIntegratedCPP() const { return true; }
57 };
58
Daniel Dunbareed1b422009-03-17 22:45:24 +000059 class VISIBILITY_HIDDEN Assemble : public Tool {
Daniel Dunbar542fae92009-03-17 22:07:58 +000060 public:
Daniel Dunbareed1b422009-03-17 22:45:24 +000061 Assemble(const ToolChain &TC) : Tool("gcc::Assemble", TC) {}
Daniel Dunbar542fae92009-03-17 22:07:58 +000062
63 virtual bool acceptsPipedInput() const { return true; }
64 virtual bool canPipeOutput() const { return false; }
65 virtual bool hasIntegratedCPP() const { return false; }
66 };
67
Daniel Dunbareed1b422009-03-17 22:45:24 +000068 class VISIBILITY_HIDDEN Link : public Tool {
Daniel Dunbar542fae92009-03-17 22:07:58 +000069 public:
Daniel Dunbareed1b422009-03-17 22:45:24 +000070 Link(const ToolChain &TC) : Tool("gcc::Link", TC) {}
Daniel Dunbar542fae92009-03-17 22:07:58 +000071
72 virtual bool acceptsPipedInput() const { return false; }
73 virtual bool canPipeOutput() const { return false; }
74 virtual bool hasIntegratedCPP() const { return false; }
75 };
Daniel Dunbareed1b422009-03-17 22:45:24 +000076} // end namespace gcc
Daniel Dunbar542fae92009-03-17 22:07:58 +000077
78} // end namespace toolchains
79} // end namespace driver
80} // end namespace clang
81
82#endif