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/Commands/CommandCompletions.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/Commands/CommandCompletions.cpp')
-rw-r--r-- | lldb/source/Commands/CommandCompletions.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp index 10c1a2429bb..2d24843fccc 100644 --- a/lldb/source/Commands/CommandCompletions.cpp +++ b/lldb/source/Commands/CommandCompletions.cpp @@ -33,6 +33,7 @@ #include "lldb/Utility/CleanUp.h" #include "llvm/ADT/SmallString.h" +#include "llvm/Support/FileSystem.h" using namespace lldb_private; @@ -109,7 +110,7 @@ typedef struct DiskFilesOrDirectoriesBaton { } DiskFilesOrDirectoriesBaton; FileSpec::EnumerateDirectoryResult -DiskFilesOrDirectoriesCallback(void *baton, FileSpec::FileType file_type, +DiskFilesOrDirectoriesCallback(void *baton, llvm::sys::fs::file_type file_type, const FileSpec &spec) { const char *name = spec.GetFilename().AsCString(); @@ -137,13 +138,12 @@ DiskFilesOrDirectoriesCallback(void *baton, FileSpec::FileType file_type, strcpy(end_ptr, name); + namespace fs = llvm::sys::fs; bool isa_directory = false; - if (file_type == FileSpec::eFileTypeDirectory) + if (file_type == fs::file_type::directory_file) isa_directory = true; - else if (file_type == FileSpec::eFileTypeSymbolicLink) { - if (FileSpec(partial_name_copy, false).IsDirectory()) - isa_directory = true; - } + else if (file_type == fs::file_type::symlink_file) + isa_directory = fs::is_directory(partial_name_copy); if (isa_directory) { *parameters->saw_directory = true; |