1// RUN: %clang_pgogen -o %t %s
2// RUN: env LLVM_PROFILE_FILE="%t.d/%m.profraw"
3// RUN: rm -fr %t.d
4// RUN: %run %t %t.d
5
6#include <errno.h>
7#include <unistd.h>
8
9int main(int argc, char **argv) {
10 if (access(name: argv[1], F_OK) == 0)
11 return 1; // %t.d should not exist yet.
12 return !(errno == ENOENT);
13}
14

source code of compiler-rt/test/profile/Linux/instrprof-dir.c