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
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index ac8a168..acafa8b 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -696,8 +696,7 @@
     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 @@
     } 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())