summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test/profile/Linux/coverage_shared.test
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/test/profile/Linux/coverage_shared.test')
-rw-r--r--compiler-rt/test/profile/Linux/coverage_shared.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler-rt/test/profile/Linux/coverage_shared.test b/compiler-rt/test/profile/Linux/coverage_shared.test
index e2b0e3e1160..748c9b39cea 100644
--- a/compiler-rt/test/profile/Linux/coverage_shared.test
+++ b/compiler-rt/test/profile/Linux/coverage_shared.test
@@ -14,3 +14,18 @@ RUN: llvm-profdata merge -o %t-shared.profdata %t-shared.profraw
RUN: llvm-cov show -instr-profile %t-shared.profdata %t.d/a.shared | FileCheck --check-prefix=COV %S/../Inputs/instrprof-dynamic-a.cpp
RUN: llvm-cov show -instr-profile %t-static.profdata %t-static | FileCheck --check-prefix=COV %S/../Inputs/instrprof-dynamic-a.cpp
+
+RUN: %clang_profgen -fdata-sections -ffunction-sections -fcoverage-mapping -m32 -c -o %t.d/a.32.shared.o -fPIC %S/../Inputs/instrprof-dynamic-a.cpp
+RUN: %clang_profgen -fdata-sections -ffunction-sections -fuse-ld=gold -Wl,--gc-sections -fcoverage-mapping -m32 -o %t.d/a.32.shared -fPIC -shared %S/../Inputs/instrprof-dynamic-a.cpp
+RUN: %clang_profgen -fdata-sections -ffunction-sections -fuse-ld=gold -Wl,--gc-sections -m32 -o %t.32-shared -fPIC -rpath %t.d %t.d/a.32.shared %S/../Inputs/instrprof-dynamic-b.cpp %S/../Inputs/instrprof-dynamic-main.cpp
+
+RUN: %clang_profgen -fdata-sections -ffunction-sections -fuse-ld=gold -Wl,--gc-sections -m32 -o %t.32-static %t.d/a.32.shared.o %S/../Inputs/instrprof-dynamic-b.cpp %S/../Inputs/instrprof-dynamic-main.cpp
+
+RUN: env LLVM_PROFILE_FILE=%t.32-static.profraw %run %t.32-static
+RUN: env LLVM_PROFILE_FILE=%t.32-shared.profraw %run %t.32-shared
+
+RUN: llvm-profdata merge -o %t.32-static.profdata %t.32-static.profraw
+RUN: llvm-profdata merge -o %t.32-shared.profdata %t.32-shared.profraw
+
+RUN: llvm-cov show -instr-profile %t.32-shared.profdata %t.d/a.32.shared | FileCheck --check-prefix=COV %S/../Inputs/instrprof-dynamic-a.cpp
+RUN: llvm-cov show -instr-profile %t.32-static.profdata %t.32-static | FileCheck --check-prefix=COV %S/../Inputs/instrprof-dynamic-a.cpp
OpenPOWER on IntegriCloud