[msan] allow -fsanitize-coverage=N together with -fsanitize=memory, clang part

llvm-svn: 223311
This commit is contained in:
Kostya Serebryany 2014-12-03 23:27:45 +00:00
parent 0c7dc9f7c3
commit bed8da2e3b
2 changed files with 2 additions and 1 deletions

View File

@ -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.

View File

@ -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