summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/posix/FileSystem.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-19 05:48:47 +0000
committerZachary Turner <zturner@google.com>2017-03-19 05:48:47 +0000
commitd3d95fd66a57e48ab257bc8b804f622e763ceafb (patch)
tree660db500ae9a94d9a5b8d7a951675b783327a16d /lldb/source/Host/posix/FileSystem.cpp
parentc8c9f972580f06a466e42a77c01d820cba0d0106 (diff)
downloadbcm5719-llvm-d3d95fd66a57e48ab257bc8b804f622e763ceafb.tar.gz
bcm5719-llvm-d3d95fd66a57e48ab257bc8b804f622e763ceafb.zip
Remove FileSystem::MakeDirectory.
Have callers use llvm::sys::fs::create_directory() instead. Differential Revision: https://reviews.llvm.org/D31086 llvm-svn: 298203
Diffstat (limited to 'lldb/source/Host/posix/FileSystem.cpp')
-rw-r--r--lldb/source/Host/posix/FileSystem.cpp33
1 files changed, 0 insertions, 33 deletions
diff --git a/lldb/source/Host/posix/FileSystem.cpp b/lldb/source/Host/posix/FileSystem.cpp
index cbdcf4fecbe..4cd9447a95b 100644
--- a/lldb/source/Host/posix/FileSystem.cpp
+++ b/lldb/source/Host/posix/FileSystem.cpp
@@ -40,39 +40,6 @@ FileSpec::PathSyntax FileSystem::GetNativePathSyntax() {
return FileSpec::ePathSyntaxPosix;
}
-Error FileSystem::MakeDirectory(const FileSpec &file_spec,
- uint32_t file_permissions) {
- if (file_spec) {
- Error error;
- if (::mkdir(file_spec.GetCString(), file_permissions) == -1) {
- error.SetErrorToErrno();
- errno = 0;
- switch (error.GetError()) {
- case ENOENT: {
- // Parent directory doesn't exist, so lets make it if we can
- // Make the parent directory and try again
- FileSpec parent_file_spec{file_spec.GetDirectory().GetCString(), false};
- error = MakeDirectory(parent_file_spec, file_permissions);
- if (error.Fail())
- return error;
- // Try and make the directory again now that the parent directory was
- // made successfully
- if (::mkdir(file_spec.GetCString(), file_permissions) == -1) {
- error.SetErrorToErrno();
- }
- return error;
- } break;
- case EEXIST: {
- if (llvm::sys::fs::is_directory(file_spec.GetPath()))
- return Error(); // It is a directory and it already exists
- } break;
- }
- }
- return error;
- }
- return Error("empty path");
-}
-
Error FileSystem::GetFilePermissions(const FileSpec &file_spec,
uint32_t &file_permissions) {
Error error;
OpenPOWER on IntegriCloud