forked from OSchip/llvm-project
[SanitizerCommon] Remove RenameFile
This function seems to be no longer used by compiler-rt libraries Differential revision: https://reviews.llvm.org/D55123 llvm-svn: 348140
This commit is contained in:
parent
fd7d515891
commit
a50c05872e
|
@ -66,9 +66,6 @@ bool ReadFromFile(fd_t fd, void *buff, uptr buff_size,
|
||||||
bool WriteToFile(fd_t fd, const void *buff, uptr buff_size,
|
bool WriteToFile(fd_t fd, const void *buff, uptr buff_size,
|
||||||
uptr *bytes_written = nullptr, error_t *error_p = nullptr);
|
uptr *bytes_written = nullptr, error_t *error_p = nullptr);
|
||||||
|
|
||||||
bool RenameFile(const char *oldpath, const char *newpath,
|
|
||||||
error_t *error_p = nullptr);
|
|
||||||
|
|
||||||
// Scoped file handle closer.
|
// Scoped file handle closer.
|
||||||
struct FileCloser {
|
struct FileCloser {
|
||||||
explicit FileCloser(fd_t fd) : fd(fd) {}
|
explicit FileCloser(fd_t fd) : fd(fd) {}
|
||||||
|
|
|
@ -193,11 +193,6 @@ bool WriteToFile(fd_t fd, const void *buff, uptr buff_size, uptr *bytes_written,
|
||||||
return true;
|
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) {
|
void *MapFileToMemory(const char *file_name, uptr *buff_size) {
|
||||||
fd_t fd = OpenFile(file_name, RdOnly);
|
fd_t fd = OpenFile(file_name, RdOnly);
|
||||||
CHECK(fd != kInvalidFd);
|
CHECK(fd != kInvalidFd);
|
||||||
|
|
|
@ -227,11 +227,6 @@ bool WriteToFile(fd_t fd, const void *buff, uptr buff_size, uptr *bytes_written,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RenameFile(const char *oldpath, const char *newpath, error_t *error_p) {
|
|
||||||
uptr res = rename(oldpath, newpath);
|
|
||||||
return !internal_iserror(res, error_p);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ReleaseMemoryPagesToOS(uptr beg, uptr end) {}
|
void ReleaseMemoryPagesToOS(uptr beg, uptr end) {}
|
||||||
void DumpProcessMap() {}
|
void DumpProcessMap() {}
|
||||||
|
|
||||||
|
|
|
@ -737,10 +737,6 @@ bool WriteToFile(fd_t fd, const void *buff, uptr buff_size, uptr *bytes_written,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RenameFile(const char *oldpath, const char *newpath, error_t *error_p) {
|
|
||||||
UNIMPLEMENTED();
|
|
||||||
}
|
|
||||||
|
|
||||||
uptr internal_sched_yield() {
|
uptr internal_sched_yield() {
|
||||||
Sleep(0);
|
Sleep(0);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue