[PATCH] D38221: Add CoreOption flag to "-coverage" option to make it available for clang-cl

Marco Castelluccio via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 25 05:04:38 PDT 2017


marco-c created this revision.

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.


https://reviews.llvm.org/D38221

Files:
  include/clang/Driver/Options.td
  test/Driver/coverage.c


Index: test/Driver/coverage.c
===================================================================
--- /dev/null
+++ test/Driver/coverage.c
@@ -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
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -515,7 +515,7 @@
 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>,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38221.116482.patch
Type: text/x-patch
Size: 1203 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170925/843afae5/attachment-0001.bin>


More information about the cfe-commits mailing list