aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-09-17 02:47:28 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-09-17 02:47:28 +0000
commitd829950b2b75d50fca2772a20129323a186993a5 (patch)
tree6e78338e48cced220e13b7fcca4e460434ac1976 /lib/Driver/Driver.cpp
parent7e1dff7a68a4d00e71debafa7f5c259473091746 (diff)
Driver: Support -dumpmachine.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114155 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 3707acad24..e24f017ceb 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -387,6 +387,11 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
// The order these options are handled in gcc is all over the place, but we
// don't expect inconsistencies w.r.t. that to matter in practice.
+ if (C.getArgs().hasArg(options::OPT_dumpmachine)) {
+ llvm::outs() << C.getDefaultToolChain().getTripleString() << '\n';
+ return false;
+ }
+
if (C.getArgs().hasArg(options::OPT_dumpversion)) {
llvm::outs() << CLANG_VERSION_STRING "\n";
return false;