diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2012-01-25 09:12:06 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2012-01-25 09:12:06 +0000 |
commit | 4d7ff6e8639bdce74e39b90370729ad0179ebcca (patch) | |
tree | 0195779ffca4090dc88a0fa910cbb37daba31f4d /lib/Driver/ToolChain.cpp | |
parent | 56576f72340cee94c85a2af21327c86a6f024d53 (diff) |
Switch the ToolChain types to all store a Driver reference rather than
a HostInfo reference. Nothing about the HostInfo was used by any
toolchain except digging out the driver from it. This just makes that
a lot more direct. The change was accomplished entirely mechanically.
It's one step closer to removing the shim full of buggy copy/paste code
that is HostInfo.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148945 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChain.cpp')
-rw-r--r-- | lib/Driver/ToolChain.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp index cd2cf2268d..c0c9c504b6 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp @@ -14,31 +14,30 @@ #include "clang/Driver/ArgList.h" #include "clang/Driver/Driver.h" #include "clang/Driver/DriverDiagnostic.h" -#include "clang/Driver/HostInfo.h" #include "clang/Driver/ObjCRuntime.h" #include "clang/Driver/Options.h" #include "llvm/Support/ErrorHandling.h" using namespace clang::driver; using namespace clang; -ToolChain::ToolChain(const HostInfo &H, const llvm::Triple &T) - : Host(H), Triple(T) { +ToolChain::ToolChain(const Driver &D, const llvm::Triple &T) + : D(D), Triple(T) { } ToolChain::~ToolChain() { } const Driver &ToolChain::getDriver() const { - return Host.getDriver(); + return D; } std::string ToolChain::GetFilePath(const char *Name) const { - return Host.getDriver().GetFilePath(Name, *this); + return D.GetFilePath(Name, *this); } std::string ToolChain::GetProgramPath(const char *Name, bool WantFile) const { - return Host.getDriver().GetProgramPath(Name, *this, WantFile); + return D.GetProgramPath(Name, *this, WantFile); } types::ID ToolChain::LookupTypeForExtension(const char *Ext) const { |