summaryrefslogtreecommitdiff
path: root/test/Instrumentation
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-05-27 12:39:31 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2014-05-27 12:39:31 +0000
commit18b6fb96120336cfcf8981483501ecf98c63f00c (patch)
treef39b2a8789bdc9a310a03cd1160f05dedb0fa83c /test/Instrumentation
parentc74a70df6ded8b538cc13be0f13db62d30a7c71f (diff)
downloadllvm-18b6fb96120336cfcf8981483501ecf98c63f00c.tar.gz
llvm-18b6fb96120336cfcf8981483501ecf98c63f00c.tar.bz2
llvm-18b6fb96120336cfcf8981483501ecf98c63f00c.tar.xz
[asancov] Emit an initializer passing number of coverage code locations in each module.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation')
-rw-r--r--test/Instrumentation/AddressSanitizer/coverage.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/Instrumentation/AddressSanitizer/coverage.ll b/test/Instrumentation/AddressSanitizer/coverage.ll
index 7f397f453f..5bc510316a 100644
--- a/test/Instrumentation/AddressSanitizer/coverage.ll
+++ b/test/Instrumentation/AddressSanitizer/coverage.ll
@@ -16,6 +16,7 @@ entry:
if.end: ; preds = %entry, %if.then
ret void
}
+
; CHECK1-LABEL: define void @foo
; CHECK1: %0 = load atomic i8* @__asan_gen_cov_foo monotonic, align 1
; CHECK1: %1 = icmp eq i8 0, %0
@@ -24,9 +25,20 @@ entry:
; CHECK1-NOT: call void @__sanitizer_cov
; CHECK1: store atomic i8 1, i8* @__asan_gen_cov_foo monotonic, align 1
+; CHECK1-LABEL: define internal void @asan.module_ctor
+; CHECK1-NOT: ret
+; CHECK1: call void @__sanitizer_cov_module_init(i64 1)
+; CHECK1: ret
+
+
; CHECK2-LABEL: define void @foo
; CHECK2: call void @__sanitizer_cov
; CHECK2: call void @__sanitizer_cov
; CHECK2: call void @__sanitizer_cov
; CHECK2-NOT: call void @__sanitizer_cov
; CHECK2: ret void
+
+; CHECK2-LABEL: define internal void @asan.module_ctor
+; CHECK2-NOT: ret
+; CHECK2: call void @__sanitizer_cov_module_init(i64 3)
+; CHECK2: ret