summaryrefslogtreecommitdiffstats
path: root/llvm/test/Instrumentation/SanitizerCoverage/tracing-comdat.ll
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-09-20 00:16:54 +0000
committerKostya Serebryany <kcc@google.com>2016-09-20 00:16:54 +0000
commit06694d0a2f487c5fc59dd8e2d76366d97598abfb (patch)
treeedd557e55190338c047e169f6eeb5d746615474f /llvm/test/Instrumentation/SanitizerCoverage/tracing-comdat.ll
parentd1d7cfcd520ec67f6ce0dd284980c040d98b9fbb (diff)
downloadbcm5719-llvm-06694d0a2f487c5fc59dd8e2d76366d97598abfb.tar.gz
bcm5719-llvm-06694d0a2f487c5fc59dd8e2d76366d97598abfb.zip
[sanitizer-coverage] add comdat to coverage guards if needed
llvm-svn: 281952
Diffstat (limited to 'llvm/test/Instrumentation/SanitizerCoverage/tracing-comdat.ll')
-rw-r--r--llvm/test/Instrumentation/SanitizerCoverage/tracing-comdat.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/test/Instrumentation/SanitizerCoverage/tracing-comdat.ll b/llvm/test/Instrumentation/SanitizerCoverage/tracing-comdat.ll
new file mode 100644
index 00000000000..f718af53644
--- /dev/null
+++ b/llvm/test/Instrumentation/SanitizerCoverage/tracing-comdat.ll
@@ -0,0 +1,13 @@
+; Test that the coverage guards have proper comdat
+; RUN: opt < %s -sancov -sanitizer-coverage-level=3 -sanitizer-coverage-trace-pc-guard -S | FileCheck %s
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+$Foo = comdat any
+; Function Attrs: uwtable
+define linkonce_odr void @Foo() comdat {
+entry:
+ ret void
+}
+
+; CHECK: @__sancov_guard.Foo = linkonce_odr global i64 0, section "__sancov_guards", comdat($Foo)
+
OpenPOWER on IntegriCloud