summaryrefslogtreecommitdiff
path: root/test/Instrumentation
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-05-28 09:26:46 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-05-28 09:26:46 +0000
commit0949668398f546d97b05076befb40a9cf6359da0 (patch)
treecdcec9e6f0ea60ab8f0ffd87d8ed441c90be13e1 /test/Instrumentation
parentd8ba67b97b57de51b302f4de8084b5c3dcce0280 (diff)
downloadllvm-0949668398f546d97b05076befb40a9cf6359da0.tar.gz
llvm-0949668398f546d97b05076befb40a9cf6359da0.tar.bz2
llvm-0949668398f546d97b05076befb40a9cf6359da0.tar.xz
[asancov] Don't emit extra runtime calls when compiling without coverage.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209721 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation')
-rw-r--r--test/Instrumentation/AddressSanitizer/coverage.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Instrumentation/AddressSanitizer/coverage.ll b/test/Instrumentation/AddressSanitizer/coverage.ll
index 5bc510316a..7e0ef1c8eb 100644
--- a/test/Instrumentation/AddressSanitizer/coverage.ll
+++ b/test/Instrumentation/AddressSanitizer/coverage.ll
@@ -1,3 +1,4 @@
+; RUN: opt < %s -asan -asan-module -asan-coverage=0 -S | FileCheck %s --check-prefix=CHECK0
; RUN: opt < %s -asan -asan-module -asan-coverage=1 -S | FileCheck %s --check-prefix=CHECK1
; RUN: opt < %s -asan -asan-module -asan-coverage=2 -S | FileCheck %s --check-prefix=CHECK2
; RUN: opt < %s -asan -asan-module -asan-coverage=2 -asan-coverage-block-threshold=10 -S | FileCheck %s --check-prefix=CHECK2
@@ -17,6 +18,9 @@ entry:
ret void
}
+; CHECK0-NOT: call void @__sanitizer_cov(
+; CHECK0-NOT: call void @__sanitizer_cov_module_init(
+
; CHECK1-LABEL: define void @foo
; CHECK1: %0 = load atomic i8* @__asan_gen_cov_foo monotonic, align 1
; CHECK1: %1 = icmp eq i8 0, %0