diff options
author | Zachary Turner <zturner@google.com> | 2017-03-21 05:47:57 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-03-21 05:47:57 +0000 |
commit | 07db3f7e3f268c01e66e87608968c5cb71e35f82 (patch) | |
tree | 77190cb10ea2358a0c94a8289919bb779d11c6f8 /lldb/source/Target/Platform.cpp | |
parent | 9b7bbeca48b10a0eb81708650777703ce41e67d7 (diff) | |
download | bcm5719-llvm-07db3f7e3f268c01e66e87608968c5cb71e35f82.tar.gz bcm5719-llvm-07db3f7e3f268c01e66e87608968c5cb71e35f82.zip |
Resubmit r298334 after fixing OSX build errors.
Hopefully this works, I can't test since I don't have Mac
hardware, however.
llvm-svn: 298340
Diffstat (limited to 'lldb/source/Target/Platform.cpp')
-rw-r--r-- | lldb/source/Target/Platform.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp index ac8a168b93e..acafa8b35c5 100644 --- a/lldb/source/Target/Platform.cpp +++ b/lldb/source/Target/Platform.cpp @@ -696,8 +696,7 @@ Error Platform::Install(const FileSpec &src, const FileSpec &dst) { namespace fs = llvm::sys::fs; switch (fs::get_file_type(src.GetPath(), false)) { case fs::file_type::directory_file: { - if (GetFileExists(fixed_dst)) - Unlink(fixed_dst); + llvm::sys::fs::remove(fixed_dst.GetPath()); uint32_t permissions = src.GetPermissions(); if (permissions == 0) permissions = eFilePermissionsDirectoryDefault; @@ -716,14 +715,12 @@ Error Platform::Install(const FileSpec &src, const FileSpec &dst) { } break; case fs::file_type::regular_file: - if (GetFileExists(fixed_dst)) - Unlink(fixed_dst); + llvm::sys::fs::remove(fixed_dst.GetPath()); error = PutFile(src, fixed_dst); break; case fs::file_type::symlink_file: { - if (GetFileExists(fixed_dst)) - Unlink(fixed_dst); + llvm::sys::fs::remove(fixed_dst.GetPath()); FileSpec src_resolved; error = FileSystem::Readlink(src, src_resolved); if (error.Success()) |