forked from OSchip/llvm-project
[msan] allow -fsanitize-coverage=N together with -fsanitize=memory, clang part
llvm-svn: 223311
This commit is contained in:
parent
0c7dc9f7c3
commit
bed8da2e3b
|
@ -298,7 +298,7 @@ SanitizerArgs::SanitizerArgs(const ToolChain &TC,
|
|||
}
|
||||
|
||||
// Parse -fsanitize-coverage=N
|
||||
if (NeedsAsan) { // Currently asan is required.
|
||||
if (NeedsAsan || NeedsMsan) { // Currently asan or msan is required.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_fsanitize_coverage)) {
|
||||
StringRef S = A->getValue();
|
||||
// Legal values are 0..4.
|
||||
|
|
|
@ -84,6 +84,7 @@
|
|||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANITIZE-COVERAGE-0
|
||||
// CHECK-SANITIZE-COVERAGE-0-NOT: fsanitize-coverage
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-coverage=1 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANITIZE-COVERAGE-1
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=memory -fsanitize-coverage=1 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANITIZE-COVERAGE-1
|
||||
// CHECK-SANITIZE-COVERAGE-1: fsanitize-coverage=1
|
||||
// RUN: %clang -target x86_64-linux-gnu -fsanitize=address -fsanitize-coverage=4 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANITIZE-COVERAGE-4
|
||||
// CHECK-SANITIZE-COVERAGE-4: fsanitize-coverage=4
|
||||
|
|
Loading…
Reference in New Issue