summaryrefslogtreecommitdiff
path: root/test/profile/instrprof-error.c
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:52:19 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:52:19 +0000
commit5c909fa013fc285f010a95e8d387e0ef3412da9c (patch)
tree1059d068ad281f4776ff44cd414574f99a460023 /test/profile/instrprof-error.c
parentf31bcc68c72371a2bf63aead9f3373a1ff2053b6 (diff)
Notes
Diffstat (limited to 'test/profile/instrprof-error.c')
-rw-r--r--test/profile/instrprof-error.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/profile/instrprof-error.c b/test/profile/instrprof-error.c
new file mode 100644
index 000000000000..4386d5321878
--- /dev/null
+++ b/test/profile/instrprof-error.c
@@ -0,0 +1,12 @@
+// RUN: %clang_profgen -o %t -O3 %s
+// RUN: touch %t.profraw
+// RUN: chmod -w %t.profraw
+// RUN: LLVM_PROFILE_FILE=%t.profraw LLVM_PROFILE_VERBOSE_ERRORS=1 %run %t 1 2>&1 | FileCheck %s
+// RUN: chmod +w %t.profraw
+
+int main(int argc, const char *argv[]) {
+ if (argc < 2)
+ return 1;
+ return 0;
+}
+// CHECK: LLVM Profile: Failed to write file