1 //===--- ToolChain.cpp - Collections of tools for one platform ----------*-===// 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 #include "clang/Driver/ToolChain.h" 11 12 #include "clang/Driver/Action.h" 13 #include "clang/Driver/Driver.h" 14 #include "clang/Driver/HostInfo.h" 15 16 using namespace clang::driver; 17 18 ToolChain::ToolChain(const HostInfo &_Host, const llvm::Triple &_Triple) 19 : Host(_Host), Triple(_Triple) { 20 } 21 22 ToolChain::~ToolChain() { 23 } 24 25 llvm::sys::Path ToolChain::GetFilePath(const Compilation &C, 26 const char *Name) const { 27 return Host.getDriver().GetFilePath(Name, *this); 28 29 } 30 31 llvm::sys::Path ToolChain::GetProgramPath(const Compilation &C, 32 const char *Name, 33 bool WantFile) const { 34 return Host.getDriver().GetProgramPath(Name, *this, WantFile); 35 } 36