summaryrefslogtreecommitdiff
path: root/test/tools/llvm-cov/cov-comdat.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/tools/llvm-cov/cov-comdat.test')
-rw-r--r--test/tools/llvm-cov/cov-comdat.test12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/tools/llvm-cov/cov-comdat.test b/test/tools/llvm-cov/cov-comdat.test
new file mode 100644
index 0000000000000..de52323014fc5
--- /dev/null
+++ b/test/tools/llvm-cov/cov-comdat.test
@@ -0,0 +1,12 @@
+REQUIRES: shell
+
+# The binary contains two (merged) covmap sections which
+# have duplicate CovMapRecords from comdat (template instantation).
+# This test makes sure the reader reads it properly. It also
+# tests that the coverage data from different instantiations
+# of the same template function are properly merged in show
+# output.
+
+// RUN: llvm-cov show %S/Inputs/binary-formats.v1.linux64l -instr-profile %S/Inputs/elf_binary_comdat.profdata -filename-equivalence %S/Inputs/instrprof-comdat.h | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h
+// RUN: llvm-cov show %S/Inputs/binary-formats.v2.linux64l -instr-profile %S/Inputs/elf_binary_comdat.profdata -filename-equivalence %S/Inputs/instrprof-comdat.h | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h
+// RUN: llvm-cov show %S/Inputs/binary-formats.v2.linux32l -instr-profile %S/Inputs/elf_binary_comdat.profdata -filename-equivalence %S/Inputs/instrprof-comdat.h | FileCheck --check-prefix=HEADER %S/Inputs/instrprof-comdat.h