summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-01-12 00:43:47 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-01-12 00:43:47 +0000
commite26e500b797056c52f10208d6c6752aa939b3c3b (patch)
tree8243414c09372d7048c5471ad694766ff15100db /clang/lib/Driver/Driver.cpp
parent553d45aaf360151ca49a35591f3c49cf10f47d4b (diff)
downloadbcm5719-llvm-e26e500b797056c52f10208d6c6752aa939b3c3b.tar.gz
bcm5719-llvm-e26e500b797056c52f10208d6c6752aa939b3c3b.zip
Driver: Change -dumpversion to return a GCC compatible answer.
- See comment for why. llvm-svn: 123296
Diffstat (limited to 'clang/lib/Driver/Driver.cpp')
-rw-r--r--clang/lib/Driver/Driver.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 6f2cfb879a4..d588dc37726 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -414,7 +414,13 @@ bool Driver::HandleImmediateArgs(const Compilation &C) {
}
if (C.getArgs().hasArg(options::OPT_dumpversion)) {
- llvm::outs() << CLANG_VERSION_STRING "\n";
+ // Since -dumpversion is only implemented for pedantic GCC compatibility, we
+ // return an answer which matches our definition of __VERSION__.
+ //
+ // If we want to return a more correct answer some day, then we should
+ // introduce a non-pedantically GCC compatible mode to Clang in which we
+ // provide sensible definitions for -dumpversion, __VERSION__, etc.
+ llvm::outs() << "4.2.1\n";
return false;
}
OpenPOWER on IntegriCloud