diff --git a/compiler-rt/test/asan/TestCases/Android/coverage-android.cc b/compiler-rt/test/asan/TestCases/Android/coverage-android.cc
index e243059fbbec..8c609636eacd 100644
--- a/compiler-rt/test/asan/TestCases/Android/coverage-android.cc
+++ b/compiler-rt/test/asan/TestCases/Android/coverage-android.cc
@@ -1,8 +1,8 @@
 // Test for direct coverage writing with dlopen.
 
 // Test normal exit, coverage level 1.
-// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %T/libcoverage_android_test_1.so -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=1 -DSO_DIR=\"%device\" %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED %s -shared -o %T/libcoverage_android_test_1.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=func -DSO_DIR=\"%device\" %s -o %t
 
 // RUN: adb shell rm -rf %device/coverage-android
 // RUN: rm -rf %T/coverage-android
@@ -18,8 +18,8 @@
 
 
 // Test sudden death, coverage level 1.
-// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED -DKILL %s -shared -o %T/libcoverage_android_test_1.so -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=1 -DSO_DIR=\"%device\" %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED -DKILL %s -shared -o %T/libcoverage_android_test_1.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=func -DSO_DIR=\"%device\" %s -o %t
 
 // RUN: adb shell rm -rf %device/coverage-android-kill
 // RUN: rm -rf %T/coverage-android-kill
@@ -35,8 +35,8 @@
 
 
 // Test normal exit, coverage level 2.
-// RUN: %clangxx_asan -fsanitize-coverage=2 -DSHARED %s -shared -o %T/libcoverage_android_test_1.so -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=2 -DSO_DIR=\"%device\" %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=bb -DSHARED %s -shared -o %T/libcoverage_android_test_1.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=bb -DSO_DIR=\"%device\" %s -o %t
 
 // RUN: adb shell rm -rf %device/coverage-android
 // RUN: rm -rf %T/coverage-android
@@ -52,8 +52,8 @@
 
 
 // Test sudden death, coverage level 2.
-// RUN: %clangxx_asan -fsanitize-coverage=2 -DSHARED -DKILL %s -shared -o %T/libcoverage_android_test_1.so -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=2 -DSO_DIR=\"%device\" %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=bb -DSHARED -DKILL %s -shared -o %T/libcoverage_android_test_1.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=bb -DSO_DIR=\"%device\" %s -o %t
 
 // RUN: adb shell rm -rf %device/coverage-android-kill
 // RUN: rm -rf %T/coverage-android-kill
@@ -69,8 +69,8 @@
 
 
 // Test normal exit, coverage level 3.
-// RUN: %clangxx_asan -fsanitize-coverage=3 -DSHARED %s -shared -o %T/libcoverage_android_test_1.so -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=3 -DSO_DIR=\"%device\" %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=edge -DSHARED %s -shared -o %T/libcoverage_android_test_1.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=edge -DSO_DIR=\"%device\" %s -o %t
 
 // RUN: adb shell rm -rf %device/coverage-android
 // RUN: rm -rf %T/coverage-android
@@ -86,8 +86,8 @@
 
 
 // Test sudden death, coverage level 3.
-// RUN: %clangxx_asan -fsanitize-coverage=3 -DSHARED -DKILL %s -shared -o %T/libcoverage_android_test_1.so -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=3 -DSO_DIR=\"%device\" %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=edge -DSHARED -DKILL %s -shared -o %T/libcoverage_android_test_1.so -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=edge -DSO_DIR=\"%device\" %s -o %t
 
 // RUN: adb shell rm -rf %device/coverage-android-kill
 // RUN: rm -rf %T/coverage-android-kill
diff --git a/compiler-rt/test/asan/TestCases/Linux/coverage-missing.cc b/compiler-rt/test/asan/TestCases/Linux/coverage-missing.cc
index e30be9453ddd..7ca92bd6d158 100644
--- a/compiler-rt/test/asan/TestCases/Linux/coverage-missing.cc
+++ b/compiler-rt/test/asan/TestCases/Linux/coverage-missing.cc
@@ -5,7 +5,7 @@
 // First case: coverage from executable. main() is called on every code path;
 // other than that, the foo and bar code paths are complementary in terms of
 // PCs covered.
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t -DFOOBAR -DMAIN
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t -DFOOBAR -DMAIN
 // RUN: rm -rf %T/coverage-missing
 // RUN: mkdir -p %T/coverage-missing
 // RUN: cd %T/coverage-missing
@@ -27,8 +27,8 @@
 
 // Second case: coverage from DSO. Strictly complementary code paths.
 // cd %T
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %dynamiclib -DFOOBAR -shared -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s %dynamiclib -o %t -DMAIN
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %dynamiclib -DFOOBAR -shared -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=func %s %dynamiclib -o %t -DMAIN
 // RUN: LIBNAME=`basename %dynamiclib`
 // RUN: rm -rf %T/coverage-missing
 // RUN: mkdir -p %T/coverage-missing
diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage-direct-activation.cc b/compiler-rt/test/asan/TestCases/Posix/coverage-direct-activation.cc
index 05dc557136a5..df14e3b329e2 100644
--- a/compiler-rt/test/asan/TestCases/Posix/coverage-direct-activation.cc
+++ b/compiler-rt/test/asan/TestCases/Posix/coverage-direct-activation.cc
@@ -1,8 +1,8 @@
 // Test for direct coverage writing enabled at activation time.
 
-// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %dynamiclib -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED %s -shared -o %dynamiclib -fPIC
 // RUN: %clangxx -c -DSO_DIR=\"%T\" %s -o %t.o
-// RUN: %clangxx_asan -fsanitize-coverage=1 %t.o %libdl -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func %t.o %libdl -o %t
 
 // RUN: rm -rf %T/coverage-direct-activation
 
diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage-direct-large.cc b/compiler-rt/test/asan/TestCases/Posix/coverage-direct-large.cc
index cf7351ddcd37..d37a78cf9a8e 100644
--- a/compiler-rt/test/asan/TestCases/Posix/coverage-direct-large.cc
+++ b/compiler-rt/test/asan/TestCases/Posix/coverage-direct-large.cc
@@ -2,8 +2,8 @@
 // Current implementation maps output file in chunks of 64K. This test overflows
 // 1 chunk.
 
-// RUN: %clangxx_asan -fsanitize-coverage=1 -O0 -DSHARED %s -shared -o %dynamiclib -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=1 -O0 %s %libdl -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func -O0 -DSHARED %s -shared -o %dynamiclib -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=func -O0 %s %libdl -o %t
 
 // RUN: rm -rf %T/coverage-direct-large
 
diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage-direct.cc b/compiler-rt/test/asan/TestCases/Posix/coverage-direct.cc
index 60acbb74b167..b621ad53c6ff 100644
--- a/compiler-rt/test/asan/TestCases/Posix/coverage-direct.cc
+++ b/compiler-rt/test/asan/TestCases/Posix/coverage-direct.cc
@@ -1,7 +1,7 @@
 // Test for direct coverage writing with dlopen at coverage level 1 to 3.
 
-// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %dynamiclib -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s %libdl -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED %s -shared -o %dynamiclib -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=func %s %libdl -o %t
 
 // RUN: rm -rf %T/coverage-direct
 
@@ -19,8 +19,8 @@
 // RUN: diff -u coverage-direct/normal/out.txt coverage-direct/direct/out.txt
 
 
-// RUN: %clangxx_asan -fsanitize-coverage=2 -DSHARED %s -shared -o %dynamiclib -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=2 -DSO_DIR=\"%T\" %s %libdl -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=bb -DSHARED %s -shared -o %dynamiclib -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=bb -DSO_DIR=\"%T\" %s %libdl -o %t
 
 // RUN: rm -rf %T/coverage-direct
 
@@ -38,8 +38,8 @@
 // RUN: diff -u coverage-direct/normal/out.txt coverage-direct/direct/out.txt
 
 
-// RUN: %clangxx_asan -fsanitize-coverage=3 -DSHARED %s -shared -o %dynamiclib -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=3 -DSO_DIR=\"%T\" %s %libdl -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=edge -DSHARED %s -shared -o %dynamiclib -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=edge -DSO_DIR=\"%T\" %s %libdl -o %t
 
 // RUN: rm -rf %T/coverage-direct
 
diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage-fork-direct.cc b/compiler-rt/test/asan/TestCases/Posix/coverage-fork-direct.cc
index 51cbbd821b8e..1b53df400b33 100644
--- a/compiler-rt/test/asan/TestCases/Posix/coverage-fork-direct.cc
+++ b/compiler-rt/test/asan/TestCases/Posix/coverage-fork-direct.cc
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
 // RUN: rm -rf %T/coverage-fork-direct
 // RUN: mkdir -p %T/coverage-fork-direct && cd %T/coverage-fork-direct
 // RUN: (ASAN_OPTIONS=coverage=1:coverage_direct=1:verbosity=1 %run %t; \
diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage-fork.cc b/compiler-rt/test/asan/TestCases/Posix/coverage-fork.cc
index 38c200942609..1f8a1e11d823 100644
--- a/compiler-rt/test/asan/TestCases/Posix/coverage-fork.cc
+++ b/compiler-rt/test/asan/TestCases/Posix/coverage-fork.cc
@@ -1,4 +1,4 @@
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
 // RUN: export ASAN_OPTIONS=coverage=1:coverage_direct=0:verbosity=1
 // RUN: rm -rf %T/coverage-fork
 // RUN: mkdir -p %T/coverage-fork && cd %T/coverage-fork
diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage-module-unloaded.cc b/compiler-rt/test/asan/TestCases/Posix/coverage-module-unloaded.cc
index 26ef479626ec..3aa6e40e82df 100644
--- a/compiler-rt/test/asan/TestCases/Posix/coverage-module-unloaded.cc
+++ b/compiler-rt/test/asan/TestCases/Posix/coverage-module-unloaded.cc
@@ -1,8 +1,8 @@
 // Check that unloading a module doesn't break coverage dumping for remaining
 // modules.
-// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %dynamiclib1 -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %dynamiclib2 -fPIC
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s %libdl -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED %s -shared -o %dynamiclib1 -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED %s -shared -o %dynamiclib2 -fPIC
+// RUN: %clangxx_asan -fsanitize-coverage=func %s %libdl -o %t
 // RUN: export ASAN_OPTIONS=coverage=1:verbosity=1
 // RUN: mkdir -p %T/coverage-module-unloaded && cd %T/coverage-module-unloaded
 // RUN: %run %t %dynamiclib1 %dynamiclib2 2>&1        | FileCheck %s
diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage-sandboxing.cc b/compiler-rt/test/asan/TestCases/Posix/coverage-sandboxing.cc
index 8f1c1ee88838..a7f822dab799 100644
--- a/compiler-rt/test/asan/TestCases/Posix/coverage-sandboxing.cc
+++ b/compiler-rt/test/asan/TestCases/Posix/coverage-sandboxing.cc
@@ -1,5 +1,5 @@
-// RUN: %clangxx_asan -fsanitize-coverage=2 -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t %ld_flags_rpath_exe
+// RUN: %clangxx_asan -fsanitize-coverage=bb -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t %ld_flags_rpath_exe
 // RUN: export ASAN_OPTIONS=coverage=1:verbosity=1
 // RUN: rm -rf %T/coverage_sandboxing_test
 // RUN: mkdir %T/coverage_sandboxing_test && cd %T/coverage_sandboxing_test
diff --git a/compiler-rt/test/asan/TestCases/Posix/coverage.cc b/compiler-rt/test/asan/TestCases/Posix/coverage.cc
index 7b590157a1e4..1ed530c94c17 100644
--- a/compiler-rt/test/asan/TestCases/Posix/coverage.cc
+++ b/compiler-rt/test/asan/TestCases/Posix/coverage.cc
@@ -1,5 +1,5 @@
-// RUN: %clangxx_asan -fsanitize-coverage=1 -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s %ld_flags_rpath_exe -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func -DSHARED %s -shared -o %dynamiclib -fPIC %ld_flags_rpath_so
+// RUN: %clangxx_asan -fsanitize-coverage=func %s %ld_flags_rpath_exe -o %t
 // RUN: export ASAN_OPTIONS=coverage=1:verbosity=1
 // RUN: rm -rf %T/coverage && mkdir -p %T/coverage && cd %T/coverage
 // RUN: %run %t 2>&1         | FileCheck %s --check-prefix=CHECK-main
diff --git a/compiler-rt/test/asan/TestCases/Windows/coverage-basic.cc b/compiler-rt/test/asan/TestCases/Windows/coverage-basic.cc
index 652884dcb258..44b499fcb4cd 100644
--- a/compiler-rt/test/asan/TestCases/Windows/coverage-basic.cc
+++ b/compiler-rt/test/asan/TestCases/Windows/coverage-basic.cc
@@ -1,6 +1,6 @@
 // RUN: rm -rf %T/coverage-basic
 // RUN: mkdir %T/coverage-basic && cd %T/coverage-basic
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o test.exe
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o test.exe
 // RUN: env ASAN_OPTIONS=coverage=1 %run ./test.exe
 //
 // RUN: %sancov print *.sancov | FileCheck %s
diff --git a/compiler-rt/test/asan/TestCases/coverage-and-lsan.cc b/compiler-rt/test/asan/TestCases/coverage-and-lsan.cc
index 4cb8e2af3084..b58447d5943e 100644
--- a/compiler-rt/test/asan/TestCases/coverage-and-lsan.cc
+++ b/compiler-rt/test/asan/TestCases/coverage-and-lsan.cc
@@ -1,6 +1,6 @@
 // Make sure coverage is dumped even if there are reported leaks.
 //
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
 //
 // RUN: rm -rf %T/coverage-and-lsan
 //
diff --git a/compiler-rt/test/asan/TestCases/coverage-caller-callee-total-count.cc b/compiler-rt/test/asan/TestCases/coverage-caller-callee-total-count.cc
index 7598f6bc7bc5..154cdcc4eb80 100644
--- a/compiler-rt/test/asan/TestCases/coverage-caller-callee-total-count.cc
+++ b/compiler-rt/test/asan/TestCases/coverage-caller-callee-total-count.cc
@@ -1,6 +1,6 @@
 // Test __sanitizer_get_total_unique_coverage for caller-callee coverage
 
-// RUN: %clangxx_asan -fsanitize-coverage=4 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=edge,indirect-calls %s -o %t
 // RUN: ASAN_OPTIONS=coverage=1 %run %t
 // RUN: rm -f caller-callee*.sancov
 //
diff --git a/compiler-rt/test/asan/TestCases/coverage-caller-callee.cc b/compiler-rt/test/asan/TestCases/coverage-caller-callee.cc
index cd318962b8e0..2182219c1d1e 100644
--- a/compiler-rt/test/asan/TestCases/coverage-caller-callee.cc
+++ b/compiler-rt/test/asan/TestCases/coverage-caller-callee.cc
@@ -1,7 +1,7 @@
 // Test caller-callee coverage with large number of threads
 // and various numbers of callers and callees.
 
-// RUN: %clangxx_asan -fsanitize-coverage=4 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=edge,indirect-calls %s -o %t
 // RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 10 1 2>&1 | FileCheck %s --check-prefix=CHECK-10-1
 // RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 9  2 2>&1 | FileCheck %s --check-prefix=CHECK-9-2
 // RUN: ASAN_OPTIONS=coverage=1:verbosity=1 %run %t 7  3 2>&1 | FileCheck %s --check-prefix=CHECK-7-3
diff --git a/compiler-rt/test/asan/TestCases/coverage-disabled.cc b/compiler-rt/test/asan/TestCases/coverage-disabled.cc
index cb33542a5701..96b1e73f962a 100644
--- a/compiler-rt/test/asan/TestCases/coverage-disabled.cc
+++ b/compiler-rt/test/asan/TestCases/coverage-disabled.cc
@@ -1,6 +1,6 @@
 // Test that no data is collected without a runtime flag.
 //
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
 //
 // RUN: rm -rf %T/coverage-disabled
 //
diff --git a/compiler-rt/test/asan/TestCases/coverage-levels.cc b/compiler-rt/test/asan/TestCases/coverage-levels.cc
index 63bed650ba03..ef62435ec223 100644
--- a/compiler-rt/test/asan/TestCases/coverage-levels.cc
+++ b/compiler-rt/test/asan/TestCases/coverage-levels.cc
@@ -1,14 +1,14 @@
 // Test various levels of coverage
 //
-// RUN: %clangxx_asan -O1 -fsanitize-coverage=1  %s -o %t
+// RUN: %clangxx_asan -O1 -fsanitize-coverage=func  %s -o %t
 // RUN: ASAN_OPTIONS=coverage=1:coverage_bitset=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
-// RUN: %clangxx_asan -O1 -fsanitize-coverage=2  %s -o %t
+// RUN: %clangxx_asan -O1 -fsanitize-coverage=bb  %s -o %t
 // RUN: ASAN_OPTIONS=coverage=1:coverage_bitset=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2
-// RUN: %clangxx_asan -O1 -fsanitize-coverage=3  %s -o %t
+// RUN: %clangxx_asan -O1 -fsanitize-coverage=edge  %s -o %t
 // RUN: ASAN_OPTIONS=coverage=1:coverage_bitset=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3
-// RUN: %clangxx_asan -O1 -fsanitize-coverage=3 -mllvm -sanitizer-coverage-block-threshold=0 %s -o %t
+// RUN: %clangxx_asan -O1 -fsanitize-coverage=edge -mllvm -sanitizer-coverage-block-threshold=0 %s -o %t
 // RUN: ASAN_OPTIONS=coverage=1:coverage_bitset=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3
-// RUN: %clangxx_asan -O1 -fsanitize-coverage=3 -mllvm -sanitizer-coverage-8bit-counters=1 %s -o %t
+// RUN: %clangxx_asan -O1 -fsanitize-coverage=edge,8bit-counters %s -o %t
 // RUN: ASAN_OPTIONS=coverage=1:coverage_counters=1:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK_COUNTERS
 
 // RUN: ASAN_OPTIONS=coverage=1:coverage_bitset=0:verbosity=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3_NOBITSET
diff --git a/compiler-rt/test/asan/TestCases/coverage-maybe-open-file.cc b/compiler-rt/test/asan/TestCases/coverage-maybe-open-file.cc
index ca3f92e808b5..4760c227d34a 100644
--- a/compiler-rt/test/asan/TestCases/coverage-maybe-open-file.cc
+++ b/compiler-rt/test/asan/TestCases/coverage-maybe-open-file.cc
@@ -1,7 +1,7 @@
 // FIXME: https://code.google.com/p/address-sanitizer/issues/detail?id=316
 // XFAIL: android
 //
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
 // RUN: rm -rf %T/coverage-maybe-open-file
 // RUN: mkdir -p %T/coverage-maybe-open-file && cd %T/coverage-maybe-open-file
 // RUN: ASAN_OPTIONS=coverage=1 %run %t | FileCheck %s --check-prefix=CHECK-success
diff --git a/compiler-rt/test/asan/TestCases/coverage-order-pcs.cc b/compiler-rt/test/asan/TestCases/coverage-order-pcs.cc
index 076fe1b92fe2..eb2b875257c8 100644
--- a/compiler-rt/test/asan/TestCases/coverage-order-pcs.cc
+++ b/compiler-rt/test/asan/TestCases/coverage-order-pcs.cc
@@ -2,7 +2,7 @@
 // RUN: DIR=%T/coverage-order-pcs
 // RUN: rm -rf $DIR
 // RUN: mkdir $DIR
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
 // RUN: ASAN_OPTIONS=coverage_dir=$DIR:coverage=1:coverage_order_pcs=0 %run %t
 // RUN: mv $DIR/*sancov $DIR/A
 
diff --git a/compiler-rt/test/asan/TestCases/coverage-reset.cc b/compiler-rt/test/asan/TestCases/coverage-reset.cc
index d3d35e21b5a7..cab40ea64f30 100644
--- a/compiler-rt/test/asan/TestCases/coverage-reset.cc
+++ b/compiler-rt/test/asan/TestCases/coverage-reset.cc
@@ -1,6 +1,6 @@
 // Test __sanitizer_reset_coverage().
 
-// RUN: %clangxx_asan -fsanitize-coverage=1 %s -o %t
+// RUN: %clangxx_asan -fsanitize-coverage=func %s -o %t
 // RUN: ASAN_OPTIONS=coverage=1 %run %t
 
 #include <sanitizer/coverage_interface.h>
diff --git a/compiler-rt/test/asan/TestCases/coverage-tracing.cc b/compiler-rt/test/asan/TestCases/coverage-tracing.cc
index 49dbb5e9528b..05f7f68a83d6 100644
--- a/compiler-rt/test/asan/TestCases/coverage-tracing.cc
+++ b/compiler-rt/test/asan/TestCases/coverage-tracing.cc
@@ -1,6 +1,6 @@
-// Test -mllvm -sanitizer-coverage-experimental-tracing
+// Test -fsanitize-coverage=trace-bb
 //
-// RUN: %clangxx_asan -O1 -fsanitize-coverage=1 -mllvm -sanitizer-coverage-experimental-tracing %s -o %t
+// RUN: %clangxx_asan -O1 -fsanitize-coverage=func,trace-bb %s -o %t
 // RUN: rm -rf   %T/coverage-tracing
 // RUN: mkdir %T/coverage-tracing
 // RUN: cd %T/coverage-tracing
diff --git a/compiler-rt/test/msan/coverage-levels.cc b/compiler-rt/test/msan/coverage-levels.cc
index 7c2e143d3ab8..d71bfecb2ebb 100644
--- a/compiler-rt/test/msan/coverage-levels.cc
+++ b/compiler-rt/test/msan/coverage-levels.cc
@@ -1,13 +1,13 @@
 // Test various levels of coverage
 //
-// RUN: %clangxx_msan -DINIT_VAR=1 -O1 -fsanitize-coverage=1  %s -o %t
+// RUN: %clangxx_msan -DINIT_VAR=1 -O1 -fsanitize-coverage=func  %s -o %t
 // RUN: mkdir -p %T/coverage-levels
 // RUN: MSAN_OPTIONS=coverage=1:verbosity=1:coverage_dir=%T/coverage-levels %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_NOWARN
-// RUN: %clangxx_msan -O1 -fsanitize-coverage=1  %s -o %t
+// RUN: %clangxx_msan -O1 -fsanitize-coverage=func  %s -o %t
 // RUN: MSAN_OPTIONS=coverage=1:verbosity=1:coverage_dir=%T/coverage-levels not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_WARN
-// RUN: %clangxx_msan -O1 -fsanitize-coverage=2  %s -o %t
+// RUN: %clangxx_msan -O1 -fsanitize-coverage=bb  %s -o %t
 // RUN: MSAN_OPTIONS=coverage=1:verbosity=1:coverage_dir=%T/coverage-levels not %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2 --check-prefix=CHECK_WARN
-// RUN: %clangxx_msan -O1 -fsanitize-coverage=3  %s -o %t
+// RUN: %clangxx_msan -O1 -fsanitize-coverage=edge  %s -o %t
 // RUN: MSAN_OPTIONS=coverage=1:verbosity=1:coverage_dir=%T/coverage-levels 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/Linux/coverage-levels.cc b/compiler-rt/test/ubsan/TestCases/Misc/Linux/coverage-levels.cc
index 4482a08ef18e..df6e835dd9df 100644
--- a/compiler-rt/test/ubsan/TestCases/Misc/Linux/coverage-levels.cc
+++ b/compiler-rt/test/ubsan/TestCases/Misc/Linux/coverage-levels.cc
@@ -2,16 +2,16 @@
 //
 // RUN: mkdir -p %T/coverage-levels
 // RUN: OPT=coverage=1:verbosity=1:coverage_dir=%T/coverage-levels
-// RUN: %clangxx -fsanitize=shift                        -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=1  %s -o %t
+// RUN: %clangxx -fsanitize=shift                        -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func  %s -o %t
 // RUN: UBSAN_OPTIONS=$OPT %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_NOWARN
-// RUN: %clangxx -fsanitize=undefined                    -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=1  %s -o %t
+// RUN: %clangxx -fsanitize=undefined                    -DGOOD_SHIFT=1 -O1 -fsanitize-coverage=func  %s -o %t
 // RUN: UBSAN_OPTIONS=$OPT %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_NOWARN
 
-// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=1  %s -o %t
+// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=func  %s -o %t
 // RUN: UBSAN_OPTIONS=$OPT %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1 --check-prefix=CHECK_WARN
-// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=2  %s -o %t
+// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=bb  %s -o %t
 // RUN: UBSAN_OPTIONS=$OPT %run %t 2>&1 | FileCheck %s --check-prefix=CHECK2 --check-prefix=CHECK_WARN
-// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=3  %s -o %t
+// RUN: %clangxx -fsanitize=shift -O1 -fsanitize-coverage=edge  %s -o %t
 // RUN: UBSAN_OPTIONS=$OPT %run %t 2>&1 | FileCheck %s --check-prefix=CHECK3 --check-prefix=CHECK_WARN
 
 // Coverage is not yet implemented in TSan.