summaryrefslogtreecommitdiffstats
path: root/lldb/source/Commands/CommandCompletions.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-07 03:43:17 +0000
committerZachary Turner <zturner@google.com>2017-03-07 03:43:17 +0000
commit990e3cd8e25970e477840d81972290858caffd50 (patch)
tree50278a2ce428ac02066aa7611cbe42cc89b11e6e /lldb/source/Commands/CommandCompletions.cpp
parent06ec03c2110e1a17271699a95ba28b0a56d9e17b (diff)
downloadbcm5719-llvm-990e3cd8e25970e477840d81972290858caffd50.tar.gz
bcm5719-llvm-990e3cd8e25970e477840d81972290858caffd50.zip
Use LLVM for all stat-related functionality.
This deletes LLDB's FileType enumeration and replaces all users, and all calls to functions that check whether a file exists etc with corresponding calls to LLVM. Differential Revision: https://reviews.llvm.org/D30624 llvm-svn: 297116
Diffstat (limited to 'lldb/source/Commands/CommandCompletions.cpp')
-rw-r--r--lldb/source/Commands/CommandCompletions.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/lldb/source/Commands/CommandCompletions.cpp b/lldb/source/Commands/CommandCompletions.cpp
index 10c1a2429bb..9e277db0c5e 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();
@@ -138,10 +139,10 @@ DiskFilesOrDirectoriesCallback(void *baton, FileSpec::FileType file_type,
strcpy(end_ptr, name);
bool isa_directory = false;
- if (file_type == FileSpec::eFileTypeDirectory)
+ if (file_type == llvm::sys::fs::file_type::directory_file)
isa_directory = true;
- else if (file_type == FileSpec::eFileTypeSymbolicLink) {
- if (FileSpec(partial_name_copy, false).IsDirectory())
+ else if (file_type == llvm::sys::fs::file_type::symlink_file) {
+ if (llvm::sys::fs::is_directory(partial_name_copy))
isa_directory = true;
}
OpenPOWER on IntegriCloud