[Clang][Driver] Add Bounds and Thread to SupportsCoverage list
authorMarco Elver <elver@google.com>
Tue, 26 May 2020 19:51:46 +0000 (12:51 -0700)
committerVitaly Buka <vitalybuka@google.com>
Tue, 26 May 2020 20:36:21 +0000 (13:36 -0700)
commit14de6e29b1315e9abe61d71e3e13f75bff80e1be
treea3da95be3e3f382633613865a0b3c2ff59da919b
parentbb10fa3a53f928e2e24ad3eaf8e57508fe9d4320
[Clang][Driver] Add Bounds and Thread to SupportsCoverage list

Summary:
This permits combining -fsanitize-coverage with -fsanitize=bounds or
-fsanitize=thread. Note that, GCC already supports combining these.

Tested:
- Add Clang end-to-end test checking IR is generated for both combinations
of sanitizers.
- Several previously failing TSAN tests now pass.

Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=45831

Reviewers: vitalybuka

Reviewed By: vitalybuka

Subscribers: #sanitizers, dvyukov, nickdesaulniers, cfe-commits

Tags: #clang, #sanitizers

Differential Revision: https://reviews.llvm.org/D79628
clang/lib/Driver/SanitizerArgs.cpp
clang/test/CodeGen/sanitize-coverage.c [new file with mode: 0644]
clang/test/Driver/fsanitize-coverage.c
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_inline8bit_counter.cpp
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_inline_bool_flag.cpp
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_no_prune.cpp
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_stack_depth.cpp
compiler-rt/test/sanitizer_common/TestCases/sanitizer_coverage_trace_pc_guard-init.cpp