summaryrefslogtreecommitdiff
path: root/test/profile
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-06-28 17:53:43 +0000
committerVedant Kumar <vsk@apple.com>2018-06-28 17:53:43 +0000
commit6cca95f3056c42c82f0f182c810a242dde893de5 (patch)
treed02fc033116c62f643f6a364eec6bbb70da39c81 /test/profile
parentf0769f6125bd664fa146fbf1fe360eaba8449e47 (diff)
[Darwin] Add an integration test for PGO + symbol exports
rdar://41470205 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@335891 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/profile')
-rw-r--r--test/profile/instrprof-darwin-exports.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/profile/instrprof-darwin-exports.c b/test/profile/instrprof-darwin-exports.c
new file mode 100644
index 000000000..6667cabdb
--- /dev/null
+++ b/test/profile/instrprof-darwin-exports.c
@@ -0,0 +1,11 @@
+// REQUIRES: osx-ld64-live_support
+
+// Compiling with PGO/code coverage on Darwin should raise no warnings or errors
+// when using an exports list.
+
+// RUN: echo "_main" > %t.exports
+// RUN: %clang_pgogen -Werror -Wl,-exported_symbols_list,%t.exports -o %t %s 2>&1 | tee %t.log
+// RUN: %clang_profgen -Werror -fcoverage-mapping -Wl,-exported_symbols_list,%t.exports -o %t %s 2>&1 | tee -a %t.log
+// RUN: cat %t.log | count 0
+
+int main() {}