]> granicus.if.org Git - clang/commitdiff
[sanitizer-coverage] -fsanitize-coverage=bb,inline-8bit-counters
authorKostya Serebryany <kcc@google.com>
Tue, 8 Aug 2017 20:20:40 +0000 (20:20 +0000)
committerKostya Serebryany <kcc@google.com>
Tue, 8 Aug 2017 20:20:40 +0000 (20:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@310409 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/SanitizerArgs.cpp
test/Driver/fsanitize-coverage.c

index 091610d03cfedfd19572a6f1560d1fc29bd4b325..2f12c6d4a5f22533d9a9b2b8d6b64192c785d7d6 100644 (file)
@@ -543,8 +543,10 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
         << "-fsanitize-coverage=trace-pc-guard";
 
   int InsertionPointTypes = CoverageFunc | CoverageBB | CoverageEdge;
+  int InstrumentationTypes =
+      CoverageTracePC | CoverageTracePCGuard | CoverageInline8bitCounters;
   if ((CoverageFeatures & InsertionPointTypes) &&
-      !(CoverageFeatures &(CoverageTracePC | CoverageTracePCGuard))) {
+      !(CoverageFeatures & InstrumentationTypes)) {
     D.Diag(clang::diag::warn_drv_deprecated_arg)
         << "-fsanitize-coverage=[func|bb|edge]"
         << "-fsanitize-coverage=[func|bb|edge],[trace-pc-guard|trace-pc]";
index a508a0733119209d7acc5d90c3b63cc1b0674648..fc4f69622a47d9c56021da69336e91bd792c439d 100644 (file)
@@ -86,6 +86,8 @@
 // CHECK_NOPRUNE: -fsanitize-coverage-no-prune
 
 // RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=inline-8bit-counters %s -### 2>&1 | FileCheck %s --check-prefix=CHECK_INLINE8BIT
+// RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=bb,inline-8bit-counters %s -### 2>&1 | FileCheck %s --check-prefix=CHECK_INLINE8BIT
+// CHECK_INLINE8BIT-NOT: warning
 // CHECK_INLINE8BIT: -fsanitize-coverage-inline-8bit-counters
 
 // RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=inline-8bit-counters,pc-table %s -### 2>&1 | FileCheck %s --check-prefix=CHECK_PC_TABLE