From: Nico Weber Date: Mon, 23 Oct 2017 15:54:44 +0000 (+0000) Subject: clang-cl: Expose --version. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5924addeeea29249ddbf048d3860c9e2198d289;p=clang clang-cl: Expose --version. 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 --- diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 9f61521408..819dbff288 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -2469,7 +2469,8 @@ def _rtlib : Separate<["--"], "rtlib">, Alias; 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; def _std : Separate<["--"], "std">, Alias; def _stdlib : Separate<["--"], "stdlib">, Alias; diff --git a/test/Driver/cl-options.c b/test/Driver/cl-options.c index 115b21963b..2435ba2932 100644 --- a/test/Driver/cl-options.c +++ b/test/Driver/cl-options.c @@ -574,6 +574,7 @@ // RUN: -fstandalone-debug \ // RUN: -flimit-debug-info \ // RUN: -flto \ +// RUN: --version \ // RUN: -Werror /Zs -- %s 2>&1