[compiler-rt] a714148 - [compiler-rt][NFC]Fix Wdeprecated warnings for fsanitize-coverage
Jinsong Ji via llvm-commits
llvm-commits at lists.llvm.org
Tue May 26 20:30:49 PDT 2020
Author: Jinsong Ji
Date: 2020-05-27T02:37:30Z
New Revision: a7141480fb04eadf8d7d60c03494bcc885979a8e
URL: https://github.com/llvm/llvm-project/commit/a7141480fb04eadf8d7d60c03494bcc885979a8e
DIFF: https://github.com/llvm/llvm-project/commit/a7141480fb04eadf8d7d60c03494bcc885979a8e.diff
LOG: [compiler-rt][NFC]Fix Wdeprecated warnings for fsanitize-coverage
A few testcases are still using deprecated options.
warning: argument '-fsanitize-coverage=[func|bb|edge]' is deprecated,
use '-fsanitize-coverage=[func|bb|edge],[trace-pc-guard|trace-pc]'
instead [-Wdeprecated]
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D79741
Added:
Modified:
compiler-rt/test/asan/TestCases/Windows/coverage-basic.cpp
compiler-rt/test/asan/TestCases/coverage-disabled.cpp
compiler-rt/test/msan/coverage-levels.cpp
compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/asan/TestCases/Windows/coverage-basic.cpp b/compiler-rt/test/asan/TestCases/Windows/coverage-basic.cpp
index 1469e1c30ae3..163247e09bf7 100644
--- a/compiler-rt/test/asan/TestCases/Windows/coverage-basic.cpp
+++ b/compiler-rt/test/asan/TestCases/Windows/coverage-basic.cpp
@@ -1,6 +1,6 @@
// RUN: rm -rf %t-dir
// RUN: mkdir %t-dir && cd %t-dir
-// RUN: %clangxx_asan -fsanitize-coverage=func %s -o test.exe
+// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o test.exe
// RUN: %env_asan_opts=coverage=1 %run ./test.exe
//
// RUN: %sancov print *.sancov | FileCheck %s
diff --git a/compiler-rt/test/asan/TestCases/coverage-disabled.cpp b/compiler-rt/test/asan/TestCases/coverage-disabled.cpp
index 46a822dff08c..2a283b465212 100644
--- a/compiler-rt/test/asan/TestCases/coverage-disabled.cpp
+++ b/compiler-rt/test/asan/TestCases/coverage-disabled.cpp
@@ -3,7 +3,7 @@
// RUN: rm -rf %t-dir
// RUN: mkdir -p %t-dir
//
-// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func,trace-pc-guard %s -o %t
//
// RUN: %env_asan_opts=coverage_direct=0:coverage_dir='"%t-dir"':verbosity=1 %run %t
// RUN: not %sancov print %t-dir/*.sancov 2>&1
diff --git a/compiler-rt/test/msan/coverage-levels.cpp b/compiler-rt/test/msan/coverage-levels.cpp
index 5ca3b717d04f..1b7778e9d7aa 100644
--- a/compiler-rt/test/msan/coverage-levels.cpp
+++ b/compiler-rt/test/msan/coverage-levels.cpp
@@ -1,13 +1,13 @@
// Test various levels of coverage
//
-// RUN: %clangxx_msan -DINIT_VAR=1 -O1 -fsanitize-coverage=func %s -o %t
+// RUN: %clangxx_msan -DINIT_VAR=1 -O1 -fsanitize-coverage=func,trace-pc-guard %s -o %t
// RUN: mkdir -p %t-dir
// RUN: MSAN_OPTIONS=coverage=1:verbosity=1:coverage_dir=%t-dir %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_NOWARN
-// RUN: %clangxx_msan -O1 -fsanitize-coverage=func %s -o %t
+// RUN: %clangxx_msan -O1 -fsanitize-coverage=func,trace-pc-guard %s -o %t
// RUN: MSAN_OPTIONS=coverage=1:verbosity=1:coverage_dir=%t-dir not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_WARN
-// RUN: %clangxx_msan -O1 -fsanitize-coverage=bb %s -o %t
+// RUN: %clangxx_msan -O1 -fsanitize-coverage=bb,trace-pc-guard %s -o %t
// RUN: MSAN_OPTIONS=coverage=1:verbosity=1:coverage_dir=%t-dir not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2 --check-prefix=CHECK_WARN
-// RUN: %clangxx_msan -O1 -fsanitize-coverage=edge %s -o %t
+// RUN: %clangxx_msan -O1 -fsanitize-coverage=edge,trace-pc-guard %s -o %t
// RUN: MSAN_OPTIONS=coverage=1:verbosity=1:coverage_dir=%t-dir not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3 --check-prefix=CHECK_WARN
volatile int sink;
diff --git a/compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp b/compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp
index 364f985c5051..4a94350ec162 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp
+++ b/compiler-rt/test/ubsan/TestCases/Misc/coverage-levels.cpp
@@ -4,20 +4,20 @@
// REQUIRES: shell
//
// RUN: rm -rf %t-dir && mkdir %t-dir
-// RUN: %clangxx -fsanitize=shift -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func %s -o %t
+// RUN: %clangxx -fsanitize=shift -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func,trace-pc-guard %s -o %t
// RUN: %env_ubsan_opts=coverage=1:verbosity=1:coverage_dir='"%t-dir"' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_NOWARN
-// RUN: %clangxx -fsanitize=undefined -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func %s -o %t
+// RUN: %clangxx -fsanitize=undefined -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func,trace-pc-guard %s -o %t
// RUN: %env_ubsan_opts=coverage=1:verbosity=1:coverage_dir='"%t-dir"' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_NOWARN
// Also works without any sanitizer.
-// RUN: %clangxx -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func %s -o %t
+// RUN: %clangxx -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func,trace-pc-guard %s -o %t
// RUN: %env_ubsan_opts=coverage=1:verbosity=1:coverage_dir='"%t-dir"' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_NOWARN
-// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=func %s -o %t
+// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=func,trace-pc-guard %s -o %t
// RUN: %env_ubsan_opts=coverage=1:verbosity=1:coverage_dir='"%t-dir"' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_WARN
-// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=bb %s -o %t
+// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=bb,trace-pc-guard %s -o %t
// RUN: %env_ubsan_opts=coverage=1:verbosity=1:coverage_dir='"%t-dir"' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2 --check-prefix=CHECK_WARN
-// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=edge %s -o %t
+// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=edge,trace-pc-guard %s -o %t
// RUN: %env_ubsan_opts=coverage=1:verbosity=1:coverage_dir='"%t-dir"' %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3 --check-prefix=CHECK_WARN
// Coverage is not yet implemented in TSan.
More information about the llvm-commits
mailing list