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 | 52e0c70868f94600e5048c8a8031df1f8767eace (patch) | |
tree | 42acf54745cfd69bfa74ee892a8c53ae45b09970 /clang/lib/Driver/Driver.cpp | |
parent | 62ca7d23ce139b4e6eaf00296efccd2058dc72a8 (diff) | |
download | bcm5719-llvm-52e0c70868f94600e5048c8a8031df1f8767eace.tar.gz bcm5719-llvm-52e0c70868f94600e5048c8a8031df1f8767eace.zip |
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).
llvm-svn: 67102
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r-- | clang/lib/Driver/Driver.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp index 0da441f1520..e809487466d 100644 --- a/clang/lib/Driver/Driver.cpp +++ b/clang/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()); } |