(LLVM up) Update to use llvm::sys::getHostTriple().
 - Always pass -triple to clang-cc (-arch will be removed).

 - clang-cc doesn't play guess work with the target triple anymore.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68119 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/driver/driver.cpp b/tools/driver/driver.cpp
index d968cc8..880a26a 100644
--- a/tools/driver/driver.cpp
+++ b/tools/driver/driver.cpp
@@ -23,6 +23,7 @@
 #include "llvm/Support/ManagedStatic.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/Support/raw_ostream.h"
+#include "llvm/System/Host.h"
 #include "llvm/System/Path.h"
 #include "llvm/System/Signals.h"
 using namespace clang;
@@ -77,13 +78,10 @@
 
   Diagnostic Diags(DiagClient.get());
 
-  // FIXME: Use the triple of the host, not the triple that we were
-  // compiled on.
-  llvm::OwningPtr<Driver> TheDriver(new Driver(Path.getBasename().c_str(),
-                                               Path.getDirname().c_str(),
-                                               LLVM_HOSTTRIPLE,
-                                               "a.out",
-                                               Diags));
+  llvm::OwningPtr<Driver> 
+    TheDriver(new Driver(Path.getBasename().c_str(), Path.getDirname().c_str(),
+                         llvm::sys::getHostTriple().c_str(),
+                         "a.out", Diags));
                                                
   llvm::OwningPtr<Compilation> C(TheDriver->BuildCompilation(argc, argv));