From 990e3cd8e25970e477840d81972290858caffd50 Mon Sep 17 00:00:00 2001 From: Zachary Turner Date: Tue, 7 Mar 2017 03:43:17 +0000 Subject: 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 --- lldb/source/Core/ModuleList.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lldb/source/Core/ModuleList.cpp') diff --git a/lldb/source/Core/ModuleList.cpp b/lldb/source/Core/ModuleList.cpp index 8ec3047dce8..0262185eed0 100644 --- a/lldb/source/Core/ModuleList.cpp +++ b/lldb/source/Core/ModuleList.cpp @@ -26,6 +26,7 @@ #include "lldb/Symbol/VariableList.h" #include "lldb/Utility/Log.h" +#include "llvm/Support/FileSystem.h" #include "llvm/Support/Threading.h" using namespace lldb; @@ -766,7 +767,8 @@ Error ModuleList::GetSharedModule(const ModuleSpec &module_spec, auto search_path_spec = module_search_paths_ptr->GetFileSpecAtIndex(idx); if (!search_path_spec.ResolvePath()) continue; - if (!search_path_spec.Exists() || !search_path_spec.IsDirectory()) + namespace fs = llvm::sys::fs; + if (!fs::is_directory(search_path_spec.GetPath())) continue; search_path_spec.AppendPathComponent( module_spec.GetFileSpec().GetFilename().AsCString()); -- cgit v1.2.3