summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Debugger.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-03-08 17:56:08 +0000
committerZachary Turner <zturner@google.com>2017-03-08 17:56:08 +0000
commit7d86ee5ab0ca98edff2f07c373967f34227c960e (patch)
tree622b630eca7be4ea6b604c8eacc956031dbb8ee9 /lldb/source/Core/Debugger.cpp
parent5c13623a69baed43b7f0cbf2912a3baa951285e2 (diff)
downloadbcm5719-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/Core/Debugger.cpp')
-rw-r--r--lldb/source/Core/Debugger.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index 7d4f94af68a..8af2bad2255 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -557,7 +557,7 @@ bool Debugger::LoadPlugin(const FileSpec &spec, Error &error) {
}
static FileSpec::EnumerateDirectoryResult
-LoadPluginCallback(void *baton, FileSpec::FileType file_type,
+LoadPluginCallback(void *baton, llvm::sys::fs::file_type ft,
const FileSpec &file_spec) {
Error error;
@@ -569,13 +569,13 @@ LoadPluginCallback(void *baton, FileSpec::FileType file_type,
Debugger *debugger = (Debugger *)baton;
+ namespace fs = llvm::sys::fs;
// If we have a regular file, a symbolic link or unknown file type, try
// and process the file. We must handle unknown as sometimes the directory
// enumeration might be enumerating a file system that doesn't have correct
// file type information.
- if (file_type == FileSpec::eFileTypeRegular ||
- file_type == FileSpec::eFileTypeSymbolicLink ||
- file_type == FileSpec::eFileTypeUnknown) {
+ if (ft == fs::file_type::regular_file || ft == fs::file_type::symlink_file ||
+ ft == fs::file_type::type_unknown) {
FileSpec plugin_file_spec(file_spec);
plugin_file_spec.ResolvePath();
@@ -588,9 +588,9 @@ LoadPluginCallback(void *baton, FileSpec::FileType file_type,
debugger->LoadPlugin(plugin_file_spec, plugin_load_error);
return FileSpec::eEnumerateDirectoryResultNext;
- } else if (file_type == FileSpec::eFileTypeUnknown ||
- file_type == FileSpec::eFileTypeDirectory ||
- file_type == FileSpec::eFileTypeSymbolicLink) {
+ } else if (ft == fs::file_type::directory_file ||
+ ft == fs::file_type::symlink_file ||
+ ft == fs::file_type::type_unknown) {
// Try and recurse into anything that a directory or symbolic link.
// We must also do this for unknown as sometimes the directory enumeration
// might be enumerating a file system that doesn't have correct file type
OpenPOWER on IntegriCloud