diff options
| author | Timur Iskhodzhanov <timurrrr@google.com> | 2015-04-23 13:18:50 +0000 |
|---|---|---|
| committer | Timur Iskhodzhanov <timurrrr@google.com> | 2015-04-23 13:18:50 +0000 |
| commit | ac990bfcd370388c59966441f2cca509baaace68 (patch) | |
| tree | ddb48a95dd083eed81b140fab17735674791e522 /compiler-rt/lib/sanitizer_common | |
| parent | caf84fe21eb9ac60b7dbbc49bce41c9cee0c6609 (diff) | |
| download | bcm5719-llvm-ac990bfcd370388c59966441f2cca509baaace68.tar.gz bcm5719-llvm-ac990bfcd370388c59966441f2cca509baaace68.zip | |
[Sanitizer coverage] Print out the error number if OpenFile fails
llvm-svn: 235593
Diffstat (limited to 'compiler-rt/lib/sanitizer_common')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc b/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc index 2c7c7e090fd..171c6cac2cc 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc @@ -571,9 +571,11 @@ static fd_t CovOpenFile(InternalScopedString *path, bool packed, else path->append("%s/%s.%s.packed", coverage_dir, name, extension); } - fd_t fd = OpenFile(path->data(), WrOnly); + error_t err; + fd_t fd = OpenFile(path->data(), WrOnly, &err); if (fd == kInvalidFd) - Report("SanitizerCoverage: failed to open %s for writing\n", path->data()); + Report("SanitizerCoverage: failed to open %s for writing (reason: %d)\n", + path->data(), err); return fd; } |

