Author: Vitaly Buka
Date: 2021-02-09T03:08:00-08:00
New Revision: 4ddf7562d5cce153b982cf16c2a776095495a2f9

URL: 
https://github.com/llvm/llvm-project/commit/4ddf7562d5cce153b982cf16c2a776095495a2f9
DIFF: 
https://github.com/llvm/llvm-project/commit/4ddf7562d5cce153b982cf16c2a776095495a2f9.diff

LOG: [NFC,Clang] Add SanCov Driver tests

Added: 
    clang/test/Driver/sancov.c

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/clang/test/Driver/sancov.c b/clang/test/Driver/sancov.c
new file mode 100644
index 000000000000..16409427ac24
--- /dev/null
+++ b/clang/test/Driver/sancov.c
@@ -0,0 +1,22 @@
+// RUN: %clang     -fexperimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -o - | 
FileCheck %s
+// RUN: %clang -O1 -fexperimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -o - | 
FileCheck %s
+// RUN: %clang -O2 -fexperimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -o - | 
FileCheck %s
+// RUN: %clang -O3 -fexperimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -o - | 
FileCheck %s
+// RUN: %clang     -fexperimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm 
-flto=thin -o - | FileCheck %s
+// FIX: %clang -O2 -fexperimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm 
-flto=thin -o - | FileCheck %s
+// RUN: %clang     -fexperimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -flto 
-o - | FileCheck %s
+// RUN: %clang -O2 -fexperimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -flto 
-o - | FileCheck %s
+
+// RUN: %clang     -fno-experimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -o - | 
FileCheck %s
+// RUN: %clang -O1 -fno-experimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -o - | 
FileCheck %s
+// RUN: %clang -O2 -fno-experimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -o - | 
FileCheck %s
+// RUN: %clang -O3 -fno-experimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -o - | 
FileCheck %s
+// RUN: %clang     -fno-experimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm 
-flto=thin -o - | FileCheck %s
+// RUN: %clang -O2 -fno-experimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm 
-flto=thin -o - | FileCheck %s
+// RUN: %clang     -fno-experimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -flto 
-o - | FileCheck %s
+// RUN: %clang -O2 -fno-experimental-new-pass-manager -target 
x86_64-unknown-linux -fsanitize-coverage=trace-pc-guard %s -S -emit-llvm -flto 
-o - | FileCheck %s
+
+// Verify that -fsanitize-coverage invokes ModuleSanitizerCoveragePass 
instrumentation.
+
+int foo(int *a) { return *a; }
+// CHECK: _sancov_


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to