summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins')
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp2
-rw-r--r--lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp2
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp8
-rw-r--r--lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp18
-rw-r--r--lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp2
-rw-r--r--lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp3
-rw-r--r--lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp2
7 files changed, 18 insertions, 19 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
index 5f827817ef1..21aed4cb1e2 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangHost.cpp
@@ -43,7 +43,7 @@ static bool DefaultComputeClangDirectory(FileSpec &file_spec) {
#if defined(__APPLE__)
static bool VerifyClangPath(const llvm::Twine &clang_path) {
- if (llvm::sys::fs::is_directory(clang_path))
+ if (FileSystem::Instance().IsDirectory(clang_path))
return true;
Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST);
if (log)
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
index 665195f0177..5ca11d9d83f 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp
@@ -601,7 +601,7 @@ ClangModulesDeclVendor::Create(Target &target) {
{
FileSpec clang_resource_dir = GetClangResourceDir();
- if (llvm::sys::fs::is_directory(clang_resource_dir.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(clang_resource_dir.GetPath())) {
compiler_invocation_arguments.push_back("-resource-dir");
compiler_invocation_arguments.push_back(clang_resource_dir.GetPath());
}
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
index 9e33896f0b2..37ee0843182 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
@@ -1208,7 +1208,7 @@ const char *PlatformDarwin::GetDeveloperDirectory() {
developer_dir_path[i] = '\0';
FileSpec devel_dir(developer_dir_path);
- if (llvm::sys::fs::is_directory(devel_dir.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(devel_dir)) {
developer_dir_path_valid = true;
}
}
@@ -1435,7 +1435,7 @@ FileSpec PlatformDarwin::FindSDKInXcodeForModules(SDKType sdk_type,
const FileSpec &sdks_spec) {
// Look inside Xcode for the required installed iOS SDK version
- if (!llvm::sys::fs::is_directory(sdks_spec.GetPath())) {
+ if (!FileSystem::Instance().IsDirectory(sdks_spec)) {
return FileSpec();
}
@@ -1451,7 +1451,7 @@ FileSpec PlatformDarwin::FindSDKInXcodeForModules(SDKType sdk_type,
sdks_spec.GetPath(), find_directories, find_files, find_other,
DirectoryEnumerator, &enumerator_info);
- if (llvm::sys::fs::is_directory(enumerator_info.found_path.GetPath()))
+ if (FileSystem::Instance().IsDirectory(enumerator_info.found_path))
return enumerator_info.found_path;
else
return FileSpec();
@@ -1596,7 +1596,7 @@ void PlatformDarwin::AddClangModuleCompilationOptionsForSDKType(
sysroot_spec = GetSDKDirectoryForModules(sdk_type);
}
- if (llvm::sys::fs::is_directory(sysroot_spec.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(sysroot_spec.GetPath())) {
options.push_back("-isysroot");
options.push_back(sysroot_spec.GetPath());
}
diff --git a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
index c567db2e75a..7381f29a784 100644
--- a/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
+++ b/lldb/source/Plugins/Platform/MacOSX/PlatformDarwinKernel.cpp
@@ -379,7 +379,7 @@ void PlatformDarwinKernel::CollectKextAndKernelDirectories() {
// Add simple directory /Applications/Xcode.app/Contents/Developer/../Symbols
FileSpec possible_dir(developer_dir + "/../Symbols");
FileSystem::Instance().Resolve(possible_dir);
- if (llvm::sys::fs::is_directory(possible_dir.GetPath()))
+ if (FileSystem::Instance().IsDirectory(possible_dir))
m_search_directories.push_back(possible_dir);
// Add simple directory of the current working directory
@@ -396,7 +396,7 @@ void PlatformDarwinKernel::GetUserSpecifiedDirectoriesToSearch() {
for (uint32_t i = 0; i < user_dirs_count; i++) {
FileSpec dir = user_dirs.GetFileSpecAtIndex(i);
FileSystem::Instance().Resolve(dir);
- if (llvm::sys::fs::is_directory(dir.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(dir)) {
m_search_directories.push_back(dir);
}
}
@@ -413,7 +413,7 @@ void PlatformDarwinKernel::AddRootSubdirsToSearchPaths(
for (int i = 0; subdirs[i] != nullptr; i++) {
FileSpec testdir(dir + subdirs[i]);
FileSystem::Instance().Resolve(testdir);
- if (llvm::sys::fs::is_directory(testdir.GetPath()))
+ if (FileSystem::Instance().IsDirectory(testdir))
thisp->m_search_directories.push_back(testdir);
}
@@ -542,11 +542,11 @@ PlatformDarwinKernel::GetKernelsAndKextsInDirectoryHelper(
// Look to see if there is a PlugIns subdir with more kexts
FileSpec contents_plugins(file_spec.GetPath() + "/Contents/PlugIns");
std::string search_here_too;
- if (llvm::sys::fs::is_directory(contents_plugins.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(contents_plugins)) {
search_here_too = contents_plugins.GetPath();
} else {
FileSpec plugins(file_spec.GetPath() + "/PlugIns");
- if (llvm::sys::fs::is_directory(plugins.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(plugins)) {
search_here_too = plugins.GetPath();
}
}
@@ -618,7 +618,7 @@ bool PlatformDarwinKernel::KextHasdSYMSibling(
std::string filename = dsym_fspec.GetFilename().AsCString();
filename += ".dSYM";
dsym_fspec.GetFilename() = ConstString(filename);
- if (llvm::sys::fs::is_directory(dsym_fspec.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(dsym_fspec)) {
return true;
}
// Should probably get the CFBundleExecutable here or call
@@ -633,7 +633,7 @@ bool PlatformDarwinKernel::KextHasdSYMSibling(
deep_bundle_str += ".dSYM";
dsym_fspec.SetFile(deep_bundle_str, FileSpec::Style::native);
FileSystem::Instance().Resolve(dsym_fspec);
- if (llvm::sys::fs::is_directory(dsym_fspec.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(dsym_fspec)) {
return true;
}
@@ -644,7 +644,7 @@ bool PlatformDarwinKernel::KextHasdSYMSibling(
shallow_bundle_str += ".dSYM";
dsym_fspec.SetFile(shallow_bundle_str, FileSpec::Style::native);
FileSystem::Instance().Resolve(dsym_fspec);
- if (llvm::sys::fs::is_directory(dsym_fspec.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(dsym_fspec)) {
return true;
}
return false;
@@ -658,7 +658,7 @@ bool PlatformDarwinKernel::KernelHasdSYMSibling(const FileSpec &kernel_binary) {
std::string filename = kernel_binary.GetFilename().AsCString();
filename += ".dSYM";
kernel_dsym.GetFilename() = ConstString(filename);
- if (llvm::sys::fs::is_directory(kernel_dsym.GetPath())) {
+ if (FileSystem::Instance().IsDirectory(kernel_dsym)) {
return true;
}
return false;
diff --git a/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp b/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
index 977da2f0ecc..70d9a5248fd 100644
--- a/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
+++ b/lldb/source/Plugins/Process/Darwin/NativeProcessDarwin.cpp
@@ -65,7 +65,7 @@ Status NativeProcessProtocol::Launch(
FileSpec working_dir(launch_info.GetWorkingDirectory());
if (working_dir) {
FileInstance::Instance().Resolve(working_dir);
- if (!llvm::sys::fs::is_directory(working_dir.GetPath())) {
+ if (!FileSystem::Instance().IsDirectory(working_dir)) {
error.SetErrorStringWithFormat("No such file or directory: %s",
working_dir.GetCString());
return error;
diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
index a23f54b7d72..bd60defe501 100644
--- a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
+++ b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp
@@ -374,10 +374,9 @@ Status ProcessFreeBSD::DoLaunch(Module *module,
assert(m_monitor == NULL);
FileSpec working_dir = launch_info.GetWorkingDirectory();
- namespace fs = llvm::sys::fs;
if (working_dir) {
FileSystem::Instance().Resolve(working_dir);
- if (!fs::is_directory(working_dir.GetPath())) {
+ if (!FileSystem::Instance().IsDirectory(working_dir.GetPath())) {
error.SetErrorStringWithFormat("No such file or directory: %s",
working_dir.GetCString());
return error;
diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
index 945b2ebabc4..583948434b2 100644
--- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp
@@ -254,7 +254,7 @@ Status ProcessWindows::DoLaunch(Module *exe_module,
namespace fs = llvm::sys::fs;
if (working_dir) {
FileSystem::Instance().Resolve(working_dir);
- if (!fs::is_directory(working_dir.GetPath())) {
+ if (!FileSystem::Instance().IsDirectory(working_dir)) {
result.SetErrorStringWithFormat("No such file or directory: %s",
working_dir.GetCString());
return result;
OpenPOWER on IntegriCloud