diff options
author | Zachary Turner <zturner@google.com> | 2017-03-08 17:56:08 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-03-08 17:56:08 +0000 |
commit | 7d86ee5ab0ca98edff2f07c373967f34227c960e (patch) | |
tree | 622b630eca7be4ea6b604c8eacc956031dbb8ee9 /lldb/source/Host/posix/FileSystem.cpp | |
parent | 5c13623a69baed43b7f0cbf2912a3baa951285e2 (diff) | |
download | bcm5719-llvm-7d86ee5ab0ca98edff2f07c373967f34227c960e.tar.gz bcm5719-llvm-7d86ee5ab0ca98edff2f07c373967f34227c960e.zip |
Resubmit FileSystem changes.
This was originall reverted due to some test failures in
ModuleCache and TestCompDirSymlink. These issues have all
been resolved and the code now passes all tests.
Differential Revision: https://reviews.llvm.org/D30698
llvm-svn: 297300
Diffstat (limited to 'lldb/source/Host/posix/FileSystem.cpp')
-rw-r--r-- | lldb/source/Host/posix/FileSystem.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lldb/source/Host/posix/FileSystem.cpp b/lldb/source/Host/posix/FileSystem.cpp index fa38f07665b..b5264d10097 100644 --- a/lldb/source/Host/posix/FileSystem.cpp +++ b/lldb/source/Host/posix/FileSystem.cpp @@ -29,6 +29,8 @@ #include "lldb/Utility/Error.h" #include "lldb/Utility/StreamString.h" +#include "llvm/Support/FileSystem.h" + using namespace lldb; using namespace lldb_private; @@ -61,7 +63,7 @@ Error FileSystem::MakeDirectory(const FileSpec &file_spec, return error; } break; case EEXIST: { - if (file_spec.IsDirectory()) + if (llvm::sys::fs::is_directory(file_spec.GetPath())) return Error(); // It is a directory and it already exists } break; } @@ -83,9 +85,9 @@ Error FileSystem::DeleteDirectory(const FileSpec &file_spec, bool recurse) { FileSpec::ForEachItemInDirectory( file_spec.GetCString(), [&error, &sub_directories]( - FileSpec::FileType file_type, + llvm::sys::fs::file_type ft, const FileSpec &spec) -> FileSpec::EnumerateDirectoryResult { - if (file_type == FileSpec::eFileTypeDirectory) { + if (ft == llvm::sys::fs::file_type::directory_file) { // Save all directorires and process them after iterating through // this directory sub_directories.push_back(spec); |