summaryrefslogtreecommitdiffstats
path: root/clang/tools/driver/driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-31 17:35:15 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-31 17:35:15 +0000
commitd640be24fd92c0814f7a83e597adf0b8b00e4566 (patch)
treeedea4e6586f298a10ba45fc027efa896bcf8405d /clang/tools/driver/driver.cpp
parentfb1a6eb69badf13177004a6226d82282588d3326 (diff)
downloadbcm5719-llvm-d640be24fd92c0814f7a83e597adf0b8b00e4566.tar.gz
bcm5719-llvm-d640be24fd92c0814f7a83e597adf0b8b00e4566.zip
(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. llvm-svn: 68119
Diffstat (limited to 'clang/tools/driver/driver.cpp')
-rw-r--r--clang/tools/driver/driver.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/clang/tools/driver/driver.cpp b/clang/tools/driver/driver.cpp
index d968cc879f0..880a26acf70 100644
--- a/clang/tools/driver/driver.cpp
+++ b/clang/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 @@ int main(int argc, const char **argv) {
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));
OpenPOWER on IntegriCloud