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/Plugins/Platform/MacOSX/PlatformDarwin.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/Plugins/Platform/MacOSX/PlatformDarwin.cpp')
-rw-r--r-- | lldb/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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()); } |