Driver: Change -dumpversion to return a GCC compatible answer.

- See comment for why.

llvm-svn: 123296
This commit is contained in:
Daniel Dunbar 2011-01-12 00:43:47 +00:00
parent 553d45aaf3
commit e26e500b79
1 changed files with 7 additions and 1 deletions

View File

@ -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;
}