2009-03-16 13:25:36 +08:00
|
|
|
//===--- ToolChain.cpp - Collections of tools for one platform ----------*-===//
|
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#include "clang/Driver/ToolChain.h"
|
|
|
|
|
|
|
|
#include "clang/Driver/Action.h"
|
|
|
|
#include "clang/Driver/Driver.h"
|
2009-03-18 05:21:26 +08:00
|
|
|
#include "clang/Driver/HostInfo.h"
|
2009-03-16 13:25:36 +08:00
|
|
|
|
|
|
|
using namespace clang::driver;
|
|
|
|
|
2009-03-18 05:21:26 +08:00
|
|
|
ToolChain::ToolChain(const HostInfo &_Host, const char *_Arch,
|
2009-03-16 13:25:36 +08:00
|
|
|
const char *_Platform, const char *_OS)
|
2009-03-18 05:21:26 +08:00
|
|
|
: Host(_Host), Arch(_Arch), Platform(_Platform), OS(_OS) {
|
2009-03-16 13:25:36 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
ToolChain::~ToolChain() {
|
|
|
|
}
|
|
|
|
|
|
|
|
llvm::sys::Path ToolChain::GetFilePath(const Compilation &C,
|
|
|
|
const char *Name) const {
|
2009-03-18 10:55:38 +08:00
|
|
|
return Host.getDriver().GetFilePath(Name, *this);
|
2009-03-16 13:25:36 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
llvm::sys::Path ToolChain::GetProgramPath(const Compilation &C,
|
2009-03-27 08:40:20 +08:00
|
|
|
const char *Name,
|
|
|
|
bool WantFile) const {
|
|
|
|
return Host.getDriver().GetProgramPath(Name, *this, WantFile);
|
2009-03-16 13:25:36 +08:00
|
|
|
}
|