diff options
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_posix.cc')
| -rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_posix.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc index 1b0f25a88f1..f3ae613de5c 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc +++ b/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc @@ -243,6 +243,11 @@ bool WriteToFile(fd_t fd, const void *buff, uptr buff_size, uptr *bytes_written, return true; } +bool RenameFile(const char *oldpath, const char *newpath, error_t *error_p) { + uptr res = internal_rename(oldpath, newpath); + return !internal_iserror(res, error_p); +} + void *MapFileToMemory(const char *file_name, uptr *buff_size) { fd_t fd = OpenFile(file_name, RdOnly); CHECK(fd != kInvalidFd); |

