aboutsummaryrefslogtreecommitdiff
path: root/test/profile
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:53 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-04-16 16:02:53 +0000
commitab0bf875a5f328a6710f4e48258979ae1bc8da1c (patch)
tree66903cf9f73151825893dcc216b04c0930317a10 /test/profile
parentabacad30a54c59ad437ccf54ec5236a8dd7f3ba9 (diff)
downloadsrc-ab0bf875a5f328a6710f4e48258979ae1bc8da1c.tar.gz
src-ab0bf875a5f328a6710f4e48258979ae1bc8da1c.zip
Notes
Diffstat (limited to 'test/profile')
-rw-r--r--test/profile/Linux/instrprof-dir.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/profile/Linux/instrprof-dir.c b/test/profile/Linux/instrprof-dir.c
new file mode 100644
index 000000000000..9d9af6daf513
--- /dev/null
+++ b/test/profile/Linux/instrprof-dir.c
@@ -0,0 +1,13 @@
+// RUN: %clang_pgogen -o %t %s
+// RUN: env LLVM_PROFILE_FILE="%t.d/%m.profraw"
+// RUN: rm -fr %t.d
+// RUN: %run %t %t.d
+
+#include <errno.h>
+#include <unistd.h>
+
+int main(int argc, char **argv) {
+ if (access(argv[1], F_OK) == 0)
+ return 1; // %t.d should not exist yet.
+ return !(errno == ENOENT);
+}