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() {
|
|
|
|
}
|
|
|
|
|
2009-12-22 02:54:17 +08:00
|
|
|
const Driver &ToolChain::getDriver() const {
|
|
|
|
return Host.getDriver();
|
|
|
|
}
|
|
|
|
|
2010-07-15 02:46:23 +08:00
|
|
|
std::string ToolChain::GetFilePath(const char *Name) const {
|
2009-03-18 10:55:38 +08:00
|
|
|
return Host.getDriver().GetFilePath(Name, *this);
|
2009-09-09 23:08:12 +08:00
|
|
|
|
2009-03-16 13:25:36 +08:00
|
|
|
}
|
|
|
|
|
2010-07-15 02:46:23 +08:00
|
|
|
std::string ToolChain::GetProgramPath(const char *Name, bool WantFile) const {
|
2009-03-27 08:40:20 +08:00
|
|
|
return Host.getDriver().GetProgramPath(Name, *this, WantFile);
|
2009-03-16 13:25:36 +08:00
|
|
|
}
|
2010-08-02 13:43:56 +08:00
|
|
|
|
|
|
|
types::ID ToolChain::LookupTypeForExtension(const char *Ext) const {
|
|
|
|
return types::lookupTypeForExtension(Ext);
|
|
|
|
}
|