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
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 0da441f..e809487 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -154,7 +154,7 @@
 
   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 @@
   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 @@
     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());
 }