diff options
author | Xinliang David Li <davidxl@google.com> | 2015-12-03 18:31:59 +0000 |
---|---|---|
committer | Xinliang David Li <davidxl@google.com> | 2015-12-03 18:31:59 +0000 |
commit | e9daa5252d3608e686b3a92770fb9fa52526ff96 (patch) | |
tree | 82055f4fc0ee343ee8728e84b589b50cd816df65 /test/profile/instrprof-error.c | |
parent | 4bc061bbb6fbd998278c440bf50260017853d64e (diff) |
[PGO] Introduce error report macro in profile-rt
Also added a test case for runtime error reporting.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@254625 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/profile/instrprof-error.c')
-rw-r--r-- | test/profile/instrprof-error.c | 12 |
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 000000000..4386d5321 --- /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 |