diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-03-17 20:45:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-03-17 20:45:45 +0000 |
commit | e504952bc89f79fc9ff54d5641ab30bb07ec435e (patch) | |
tree | e65dbf05e8e0a2feb0a94700c941063a90e4deb5 /lib/Driver/Driver.cpp | |
parent | ec504fdfef7d4983f76b90c6bb28e438ab2ffbb7 (diff) |
Driver: Pass Driver reference down into Host info, which will need it
to pass to ToolChains, which may need Driver specific information (for
example, to form search paths).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67102 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index 0da441f152..e809487466 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -154,7 +154,7 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) { ArgList *Args = ParseArgStrings(Start, End); - Host = Driver::GetHostInfo(HostTriple); + Host = GetHostInfo(HostTriple); DefaultToolChain = Host->getToolChain(*Args); // FIXME: This behavior shouldn't be here. @@ -816,7 +816,7 @@ llvm::sys::Path Driver::GetProgramPath(const char *Name, return llvm::sys::Path(Name); } -const HostInfo *Driver::GetHostInfo(const char *Triple) { +const HostInfo *Driver::GetHostInfo(const char *Triple) const { // Dice into arch, platform, and OS. This matches // arch,platform,os = '(.*?)-(.*?)-(.*?)' // and missing fields are left empty. @@ -842,7 +842,9 @@ const HostInfo *Driver::GetHostInfo(const char *Triple) { Arch = "x86_64"; if (memcmp(&OS[0], "darwin", 6) == 0) - return createDarwinHostInfo(Arch.c_str(), Platform.c_str(), OS.c_str()); + return createDarwinHostInfo(*this, Arch.c_str(), Platform.c_str(), + OS.c_str()); - return createUnknownHostInfo(Arch.c_str(), Platform.c_str(), OS.c_str()); + return createUnknownHostInfo(*this, Arch.c_str(), Platform.c_str(), + OS.c_str()); } |