[PATCH] D56803: clang -dumpversion returns 4.2.1 for legacy reason, update it
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 25 11:05:00 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL356931: clang -dumpversion returns 4.2.1 for legacy reason, update it (authored by sylvestre, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56803/new/
https://reviews.llvm.org/D56803
Files:
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/test/Driver/immediate-options.c
Index: cfe/trunk/test/Driver/immediate-options.c
===================================================================
--- cfe/trunk/test/Driver/immediate-options.c
+++ cfe/trunk/test/Driver/immediate-options.c
@@ -7,7 +7,7 @@
// HELP-HIDDEN: driver-mode
// RUN: %clang -dumpversion | FileCheck %s -check-prefix=DUMPVERSION
-// DUMPVERSION: 4.2.1
+// DUMPVERSION: {{[0-9]+\.[0-9.]+}}
// RUN: %clang -print-search-dirs | FileCheck %s -check-prefix=PRINT-SEARCH-DIRS
// PRINT-SEARCH-DIRS: programs: ={{.*}}
Index: cfe/trunk/lib/Driver/Driver.cpp
===================================================================
--- cfe/trunk/lib/Driver/Driver.cpp
+++ cfe/trunk/lib/Driver/Driver.cpp
@@ -1640,11 +1640,7 @@
if (C.getArgs().hasArg(options::OPT_dumpversion)) {
// 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";
+ llvm::outs() << CLANG_VERSION_STRING << "\n";
return false;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56803.192161.patch
Type: text/x-patch
Size: 1264 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190325/7ce019c8/attachment.bin>
More information about the llvm-commits
mailing list