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-05-22 10:53:45 +08:00
|
|
|
ToolChain::ToolChain(const HostInfo &_Host, const llvm::Triple &_Triple)
|
|
|
|
: Host(_Host), Triple(_Triple) {
|
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
|
|
|
}
|