summaryrefslogtreecommitdiff
path: root/test/profile/Linux/instrprof-value-prof-visibility.test
diff options
context:
space:
mode:
Diffstat (limited to 'test/profile/Linux/instrprof-value-prof-visibility.test')
-rw-r--r--test/profile/Linux/instrprof-value-prof-visibility.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/profile/Linux/instrprof-value-prof-visibility.test b/test/profile/Linux/instrprof-value-prof-visibility.test
new file mode 100644
index 000000000..5b64a94a2
--- /dev/null
+++ b/test/profile/Linux/instrprof-value-prof-visibility.test
@@ -0,0 +1,6 @@
+# This tests that lprofMergeValueProfData is not accessed from outside a module
+RUN: mkdir -p %t.d
+RUN: %clang_profgen -o %t.d/func.shared -fPIC -shared -fuse-ld=gold -mllvm --enable-value-profiling=true %S/../Inputs/instrprof-value-prof-visibility.c -fdata-sections -ffunction-sections -fuse-ld=gold -Wl,--gc-sections
+RUN: %clang_profgen -o %t.d/main -fuse-ld=gold -mllvm --enable-value-profiling=true -DDLOPEN_FUNC_DIR=\"%t.d\" %S/../Inputs/instrprof-value-prof-visibility.c -fdata-sections -ffunction-sections -fuse-ld=gold -Wl,--gc-sections
+RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t.d/main
+