[cfe-commits] r123296 - /cfe/trunk/lib/Driver/Driver.cpp

Daniel Dunbar daniel at zuster.org
Tue Jan 11 16:43:47 PST 2011


Author: ddunbar
Date: Tue Jan 11 18:43:47 2011
New Revision: 123296

URL: http://llvm.org/viewvc/llvm-project?rev=123296&view=rev
Log:
Driver: Change -dumpversion to return a GCC compatible answer.
 - See comment for why.

Modified:
    cfe/trunk/lib/Driver/Driver.cpp

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=123296&r1=123295&r2=123296&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Jan 11 18:43:47 2011
@@ -414,7 +414,13 @@
   }
 
   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;
   }
 





More information about the cfe-commits mailing list