forked from OSchip/llvm-project
[sanitizer-coverage] deprecate -fsanitize-coverage=trace-bb
llvm-svn: 300767
This commit is contained in:
parent
a2a0d2d3fc
commit
1c0e9e98c0
|
@ -508,12 +508,11 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
|
|||
// Basic block tracing and 8-bit counters require some type of coverage
|
||||
// enabled.
|
||||
int CoverageTypes = CoverageFunc | CoverageBB | CoverageEdge;
|
||||
if ((CoverageFeatures & CoverageTraceBB) &&
|
||||
!(CoverageFeatures & CoverageTypes))
|
||||
D.Diag(clang::diag::err_drv_argument_only_allowed_with)
|
||||
if (CoverageFeatures & CoverageTraceBB)
|
||||
D.Diag(clang::diag::warn_drv_deprecated_arg)
|
||||
<< "-fsanitize-coverage=trace-bb"
|
||||
<< "-fsanitize-coverage=(func|bb|edge)";
|
||||
if ((CoverageFeatures & Coverage8bitCounters))
|
||||
<< "-fsanitize-coverage=trace-pc-guard";
|
||||
if (CoverageFeatures & Coverage8bitCounters)
|
||||
D.Diag(clang::diag::warn_drv_deprecated_arg)
|
||||
<< "-fsanitize-coverage=8bit-counters"
|
||||
<< "-fsanitize-coverage=trace-pc-guard";
|
||||
|
|
|
@ -33,16 +33,15 @@
|
|||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-coverage=func -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANITIZE-COVERAGE-SAN-DISABLED
|
||||
// CHECK-SANITIZE-COVERAGE-SAN-DISABLED-NOT: argument unused
|
||||
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-coverage=edge,indirect-calls,trace-bb,trace-pc,trace-cmp,trace-div,trace-gep %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANITIZE-COVERAGE-FEATURES
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-coverage=edge,indirect-calls,trace-pc,trace-cmp,trace-div,trace-gep %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANITIZE-COVERAGE-FEATURES
|
||||
// CHECK-SANITIZE-COVERAGE-FEATURES: -fsanitize-coverage-type=3
|
||||
// CHECK-SANITIZE-COVERAGE-FEATURES: -fsanitize-coverage-indirect-calls
|
||||
// CHECK-SANITIZE-COVERAGE-FEATURES: -fsanitize-coverage-trace-bb
|
||||
// CHECK-SANITIZE-COVERAGE-FEATURES: -fsanitize-coverage-trace-cmp
|
||||
// CHECK-SANITIZE-COVERAGE-FEATURES: -fsanitize-coverage-trace-div
|
||||
// CHECK-SANITIZE-COVERAGE-FEATURES: -fsanitize-coverage-trace-gep
|
||||
// CHECK-SANITIZE-COVERAGE-FEATURES: -fsanitize-coverage-trace-pc
|
||||
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-coverage=func,edge,indirect-calls,trace-bb,trace-cmp -fno-sanitize-coverage=edge,indirect-calls,trace-bb %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MASK
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-coverage=func,edge,indirect-calls,trace-cmp -fno-sanitize-coverage=edge,indirect-calls %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MASK
|
||||
// CHECK-MASK: -fsanitize-coverage-type=1
|
||||
// CHECK-MASK: -fsanitize-coverage-trace-cmp
|
||||
// CHECK-MASK-NOT: -fsanitize-coverage-
|
||||
|
@ -55,6 +54,8 @@
|
|||
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=8bit-counters %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-8BIT
|
||||
// CHECK-8BIT: warning: argument '-fsanitize-coverage=8bit-counters' is deprecated, use '-fsanitize-coverage=trace-pc-guard' instead
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=trace-bb %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACE-BB
|
||||
// CHECK-TRACE-BB: warning: argument '-fsanitize-coverage=trace-bb' is deprecated, use '-fsanitize-coverage=trace-pc-guard' instead
|
||||
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=trace-pc %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACE_PC_EDGE
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize-coverage=edge,trace-pc %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACE_PC_EDGE
|
||||
|
|
Loading…
Reference in New Issue