]> granicus.if.org Git - clang/commitdiff
clang-cl: Expose --version.
authorNico Weber <nicolasweber@gmx.de>
Mon, 23 Oct 2017 15:54:44 +0000 (15:54 +0000)
committerNico Weber <nicolasweber@gmx.de>
Mon, 23 Oct 2017 15:54:44 +0000 (15:54 +0000)
This is for consistency with lld-link, see https://reviews.llvm.org/D38972
Also give --version a help text so it shows up in --help / /? output (for
both clang-cl and regular clang).

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@316335 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
test/Driver/cl-options.c

index 9f6152140883f032aba27aa1e20fa0120cc5101f..819dbff288eb2effd44a4d753a750c4648921faf 100644 (file)
@@ -2469,7 +2469,8 @@ def _rtlib : Separate<["--"], "rtlib">, Alias<rtlib_EQ>;
 def _serialize_diags : Separate<["-", "--"], "serialize-diagnostics">, Flags<[DriverOption]>,
   HelpText<"Serialize compiler diagnostics to a file">;
 // We give --version different semantics from -version.
-def _version : Flag<["--"], "version">,  Flags<[CC1Option]>;
+def _version : Flag<["--"], "version">, Flags<[CoreOption, CC1Option]>,
+  HelpText<"Print version information">;
 def _signed_char : Flag<["--"], "signed-char">, Alias<fsigned_char>;
 def _std : Separate<["--"], "std">, Alias<std_EQ>;
 def _stdlib : Separate<["--"], "stdlib">, Alias<stdlib_EQ>;
index 115b21963b3447406d77b7e2249fa6fc8ed4373b..2435ba293288e88dfe5f719245516d760b159c3a 100644 (file)
 // RUN:     -fstandalone-debug \
 // RUN:     -flimit-debug-info \
 // RUN:     -flto \
+// RUN:     --version \
 // RUN:     -Werror /Zs -- %s 2>&1