xref: /netbsd-src/sys/external/bsd/compiler_rt/dist/test/profile/instrprof-error.c (revision 627f7eb200a4419d89b531d55fccd2ee3ffdcde0)
1 // RUN: %clang_profgen -o %t -O3 %s
2 // RUN: touch %t.profraw
3 // RUN: chmod -w %t.profraw
4 // RUN: LLVM_PROFILE_FILE=%t.profraw LLVM_PROFILE_VERBOSE_ERRORS=1 %run %t 1 2>&1 | FileCheck %s
5 // RUN: chmod +w %t.profraw
6 
7 int main(int argc, const char *argv[]) {
8   if (argc < 2)
9     return 1;
10   return 0;
11 }
12 // CHECK: LLVM Profile: Failed to write file
13