Daniel Dunbar | 542fae9 | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 1 | //===--- 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 | |
| 17 | namespace clang { |
| 18 | namespace driver { |
Daniel Dunbar | 7c76412 | 2009-03-17 22:18:43 +0000 | [diff] [blame^] | 19 | namespace tools { |
Daniel Dunbar | 542fae9 | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 20 | |
Daniel Dunbar | 7c76412 | 2009-03-17 22:18:43 +0000 | [diff] [blame^] | 21 | class VISIBILITY_HIDDEN Clang : public Tool { |
Daniel Dunbar | 542fae9 | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 22 | public: |
| 23 | Clang(const ToolChain &TC) : Tool(TC) {} |
| 24 | |
| 25 | virtual bool acceptsPipedInput() const { return true; } |
| 26 | virtual bool canPipeOutput() const { return true; } |
| 27 | virtual bool hasIntegratedCPP() const { return true; } |
| 28 | }; |
| 29 | |
Daniel Dunbar | 7c76412 | 2009-03-17 22:18:43 +0000 | [diff] [blame^] | 30 | class VISIBILITY_HIDDEN GCC_Preprocess : public Tool { |
Daniel Dunbar | 542fae9 | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 31 | public: |
| 32 | GCC_Preprocess(const ToolChain &TC) : Tool(TC) {} |
| 33 | |
| 34 | virtual bool acceptsPipedInput() const { return true; } |
| 35 | virtual bool canPipeOutput() const { return true; } |
| 36 | virtual bool hasIntegratedCPP() const { return false; } |
| 37 | }; |
| 38 | |
Daniel Dunbar | 7c76412 | 2009-03-17 22:18:43 +0000 | [diff] [blame^] | 39 | class VISIBILITY_HIDDEN GCC_Precompile : public Tool { |
Daniel Dunbar | 542fae9 | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 40 | public: |
| 41 | GCC_Precompile(const ToolChain &TC) : Tool(TC) {} |
| 42 | |
| 43 | virtual bool acceptsPipedInput() const { return true; } |
| 44 | virtual bool canPipeOutput() const { return false; } |
| 45 | virtual bool hasIntegratedCPP() const { return true; } |
| 46 | }; |
| 47 | |
Daniel Dunbar | 7c76412 | 2009-03-17 22:18:43 +0000 | [diff] [blame^] | 48 | class VISIBILITY_HIDDEN GCC_Compile : public Tool { |
Daniel Dunbar | 542fae9 | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 49 | public: |
| 50 | GCC_Compile(const ToolChain &TC) : Tool(TC) {} |
| 51 | |
| 52 | virtual bool acceptsPipedInput() const { return true; } |
| 53 | virtual bool canPipeOutput() const { return true; } |
| 54 | virtual bool hasIntegratedCPP() const { return true; } |
| 55 | }; |
| 56 | |
Daniel Dunbar | 7c76412 | 2009-03-17 22:18:43 +0000 | [diff] [blame^] | 57 | class VISIBILITY_HIDDEN GCC_Assemble : public Tool { |
Daniel Dunbar | 542fae9 | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 58 | public: |
| 59 | GCC_Assemble(const ToolChain &TC) : Tool(TC) {} |
| 60 | |
| 61 | virtual bool acceptsPipedInput() const { return true; } |
| 62 | virtual bool canPipeOutput() const { return false; } |
| 63 | virtual bool hasIntegratedCPP() const { return false; } |
| 64 | }; |
| 65 | |
Daniel Dunbar | 7c76412 | 2009-03-17 22:18:43 +0000 | [diff] [blame^] | 66 | class VISIBILITY_HIDDEN GCC_Link : public Tool { |
Daniel Dunbar | 542fae9 | 2009-03-17 22:07:58 +0000 | [diff] [blame] | 67 | public: |
| 68 | GCC_Link(const ToolChain &TC) : Tool(TC) {} |
| 69 | |
| 70 | virtual bool acceptsPipedInput() const { return false; } |
| 71 | virtual bool canPipeOutput() const { return false; } |
| 72 | virtual bool hasIntegratedCPP() const { return false; } |
| 73 | }; |
| 74 | |
| 75 | } // end namespace toolchains |
| 76 | } // end namespace driver |
| 77 | } // end namespace clang |
| 78 | |
| 79 | #endif |