Tools.h revision 31b1e5437e7435879fc044afb77ff27096008e72
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 17namespace clang { 18namespace driver { 19namespace tools { 20 21 class VISIBILITY_HIDDEN Clang : public Tool { 22 public: 23 Clang(const ToolChain &TC) : Tool("clang", 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 30 /// gcc - Generic GCC tool implementations. 31namespace gcc { 32 class VISIBILITY_HIDDEN Preprocess : public Tool { 33 public: 34 Preprocess(const ToolChain &TC) : Tool("gcc::Preprocess", TC) {} 35 36 virtual bool acceptsPipedInput() const { return true; } 37 virtual bool canPipeOutput() const { return true; } 38 virtual bool hasIntegratedCPP() const { return false; } 39 }; 40 41 class VISIBILITY_HIDDEN Precompile : public Tool { 42 public: 43 Precompile(const ToolChain &TC) : Tool("gcc::Precompile", TC) {} 44 45 virtual bool acceptsPipedInput() const { return true; } 46 virtual bool canPipeOutput() const { return false; } 47 virtual bool hasIntegratedCPP() const { return true; } 48 }; 49 50 class VISIBILITY_HIDDEN Compile : public Tool { 51 public: 52 Compile(const ToolChain &TC) : Tool("gcc::Compile", TC) {} 53 54 virtual bool acceptsPipedInput() const { return true; } 55 virtual bool canPipeOutput() const { return true; } 56 virtual bool hasIntegratedCPP() const { return true; } 57 }; 58 59 class VISIBILITY_HIDDEN Assemble : public Tool { 60 public: 61 Assemble(const ToolChain &TC) : Tool("gcc::Assemble", TC) {} 62 63 virtual bool acceptsPipedInput() const { return true; } 64 virtual bool canPipeOutput() const { return false; } 65 virtual bool hasIntegratedCPP() const { return false; } 66 }; 67 68 class VISIBILITY_HIDDEN Link : public Tool { 69 public: 70 Link(const ToolChain &TC) : Tool("gcc::Link", TC) {} 71 72 virtual bool acceptsPipedInput() const { return false; } 73 virtual bool canPipeOutput() const { return false; } 74 virtual bool hasIntegratedCPP() const { return false; } 75 }; 76} // end namespace gcc 77 78} // end namespace toolchains 79} // end namespace driver 80} // end namespace clang 81 82#endif 83