r317709 - Add CoreOption flag to "-coverage" option to make it available for clang-cl
Marco Castelluccio via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 8 11:21:54 PST 2017
Author: marco
Date: Wed Nov 8 11:21:54 2017
New Revision: 317709
URL: http://llvm.org/viewvc/llvm-project?rev=317709&view=rev
Log:
Add CoreOption flag to "-coverage" option to make it available for clang-cl
Summary:
The -coverage option is not a CoreOption, so it is not available to clang-cl.
This patch adds the CoreOption flag to "-coverage" to allow it to be used with clang-cl.
Reviewers: rnk
Reviewed By: rnk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D38221
Added:
cfe/trunk/test/Driver/coverage.c
Modified:
cfe/trunk/include/clang/Driver/Options.td
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=317709&r1=317708&r2=317709&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Wed Nov 8 11:21:54 2017
@@ -519,7 +519,7 @@ def cl_fp32_correctly_rounded_divide_sqr
def client__name : JoinedOrSeparate<["-"], "client_name">;
def combine : Flag<["-", "--"], "combine">, Flags<[DriverOption, Unsupported]>;
def compatibility__version : JoinedOrSeparate<["-"], "compatibility_version">;
-def coverage : Flag<["-", "--"], "coverage">;
+def coverage : Flag<["-", "--"], "coverage">, Flags<[CoreOption]>;
def cpp_precomp : Flag<["-"], "cpp-precomp">, Group<clang_ignored_f_Group>;
def current__version : JoinedOrSeparate<["-"], "current_version">;
def cxx_isystem : JoinedOrSeparate<["-"], "cxx-isystem">, Group<clang_i_Group>,
Added: cfe/trunk/test/Driver/coverage.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/coverage.c?rev=317709&view=auto
==============================================================================
--- cfe/trunk/test/Driver/coverage.c (added)
+++ cfe/trunk/test/Driver/coverage.c Wed Nov 8 11:21:54 2017
@@ -0,0 +1,7 @@
+// Test coverage flag.
+//
+// RUN: %clang_cl -### -coverage %s -o foo/bar.o 2>&1 | FileCheck -check-prefix=CLANG-CL-COVERAGE %s
+// CLANG-CL-COVERAGE-NOT: error:
+// CLANG-CL-COVERAGE-NOT: warning:
+// CLANG-CL-COVERAGE-NOT: argument unused
+// CLANG-CL-COVERAGE-NOT: unknown argument
More information about the cfe-commits
mailing list