r233384 - Make -fsanitize-coverage flag a core option so it's available via the clang-cl driver too
Timur Iskhodzhanov
timurrrr at google.com
Fri Mar 27 09:32:10 PDT 2015
Author: timurrrr
Date: Fri Mar 27 11:32:10 2015
New Revision: 233384
URL: http://llvm.org/viewvc/llvm-project?rev=233384&view=rev
Log:
Make -fsanitize-coverage flag a core option so it's available via the clang-cl driver too
Reviewed at http://reviews.llvm.org/D8663
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/test/Driver/fsanitize.c
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=233384&r1=233383&r2=233384&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Fri Mar 27 11:32:10 2015
@@ -524,7 +524,7 @@ def fno_sanitize_blacklist : Flag<["-"],
Group<f_clang_Group>,
HelpText<"Don't use blacklist file for sanitizers">;
def fsanitize_coverage : Joined<["-"], "fsanitize-coverage=">,
- Group<f_clang_Group>, Flags<[CC1Option]>,
+ Group<f_clang_Group>, Flags<[CC1Option, CoreOption]>,
HelpText<"Enable coverage instrumentation for Sanitizers">;
def fsanitize_memory_track_origins_EQ : Joined<["-"], "fsanitize-memory-track-origins=">,
Group<f_clang_Group>, Flags<[CC1Option]>,
Modified: cfe/trunk/test/Driver/fsanitize.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/fsanitize.c?rev=233384&r1=233383&r2=233384&view=diff
==============================================================================
--- cfe/trunk/test/Driver/fsanitize.c (original)
+++ cfe/trunk/test/Driver/fsanitize.c Fri Mar 27 11:32:10 2015
@@ -229,3 +229,11 @@
// RUN: %clang_cl -fsanitize=address -c -MDd -MD -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-RELEASERTL
// RUN: %clang_cl -fsanitize=address -c -LDd -LD -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-RELEASERTL
// CHECK-ASAN-RELEASERTL-NOT: error: invalid argument
+
+// RUN: %clang_cl -fsanitize=address -fsanitize-coverage=1 -c -### -- %s 2>&1 | FileCheck %s -check-prefix=CLANG-CL-COVERAGE
+// CLANG-CL-COVERAGE-NOT: error:
+// CLANG-CL-COVERAGE-NOT: warning:
+// CLANG-CL-COVERAGE-NOT: argument unused
+// CLANG-CL-COVERAGE-NOT: unknown argument
+// CLANG-CL-COVERAGE: -fsanitize=address
+// CLANG-CL-COVERAGE: -fsanitize-coverage=1
More information about the cfe-commits
mailing list