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/Host/macosx/objcxx | |
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/Host/macosx/objcxx')
-rw-r--r-- | lldb/source/Host/macosx/objcxx/Host.mm | 4 | ||||
-rw-r--r-- | lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Host/macosx/objcxx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm index 6d6cf6a3199..297a052ac8e 100644 --- a/lldb/source/Host/macosx/objcxx/Host.mm +++ b/lldb/source/Host/macosx/objcxx/Host.mm @@ -101,7 +101,7 @@ using namespace lldb_private; bool Host::GetBundleDirectory(const FileSpec &file, FileSpec &bundle_directory) { #if defined(__APPLE__) - if (llvm::sys::fs::is_directory(file.GetPath())) { + if (FileSystem::Instance().IsDirectory(file)) { char path[PATH_MAX]; if (file.GetPath(path, sizeof(path))) { CFCBundle bundle(path); @@ -118,7 +118,7 @@ bool Host::GetBundleDirectory(const FileSpec &file, bool Host::ResolveExecutableInBundle(FileSpec &file) { #if defined(__APPLE__) - if (llvm::sys::fs::is_directory(file.GetPath())) { + if (FileSystem::Instance().IsDirectory(file)) { char path[PATH_MAX]; if (file.GetPath(path, sizeof(path))) { CFCBundle bundle(path); diff --git a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm index e9f84778b82..165e87e8bed 100644 --- a/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm +++ b/lldb/source/Host/macosx/objcxx/HostInfoMacOSX.mm @@ -141,7 +141,7 @@ bool HostInfoMacOSX::ComputeSupportExeDirectory(FileSpec &file_spec) { raw_path.append("/../bin"); FileSpec support_dir_spec(raw_path); FileSystem::Instance().Resolve(support_dir_spec); - if (!llvm::sys::fs::is_directory(support_dir_spec.GetPath())) { + if (!FileSystem::Instance().IsDirectory(support_dir_spec)) { Log *log = lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_HOST); if (log) log->Printf("HostInfoMacOSX::%s(): failed to find support directory", |