mirror of
https://github.com/intel/llvm.git
synced 2026-02-01 08:56:15 +08:00
[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
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user