diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-08 00:14:50 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-08 00:14:50 +0000 |
commit | 3a58d89819389488df9fb5155f6d73ddd60e4816 (patch) | |
tree | 481f9e7a79eaf70ff06d7400a3ecf19c9f142aae /lldb/source/Core/ModuleList.cpp | |
parent | 09dff53840787c0dbc031f1e5723834f62073f74 (diff) | |
download | bcm5719-llvm-3a58d89819389488df9fb5155f6d73ddd60e4816.tar.gz bcm5719-llvm-3a58d89819389488df9fb5155f6d73ddd60e4816.zip |
[FileSystem] Add convenience method to check for directories.
Replace calls to LLVM's is_directory with calls to LLDB's FileSytem
class. For this I introduced a new convenience method that, like the
other methods, takes either a path or filespec. This still uses the LLVM
functions under the hood.
Differential revision: https://reviews.llvm.org/D54135
llvm-svn: 346375
Diffstat (limited to 'lldb/source/Core/ModuleList.cpp')
-rw-r--r-- | lldb/source/Core/ModuleList.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index baa5ff58501..9cff6c8218d 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -859,7 +859,7 @@ Status ModuleList::GetSharedModule(const ModuleSpec &module_spec, auto search_path_spec = module_search_paths_ptr->GetFileSpecAtIndex(idx); FileSystem::Instance().Resolve(search_path_spec); namespace fs = llvm::sys::fs; - if (!fs::is_directory(search_path_spec.GetPath())) + if (!FileSystem::Instance().IsDirectory(search_path_spec)) continue; search_path_spec.AppendPathComponent( module_spec.GetFileSpec().GetFilename().AsCString()); |