summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2018-11-01 15:47:33 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2018-11-01 15:47:33 +0000
commit7c5310bbd3eeaa654f4f008e93f8a91cefe69c06 (patch)
tree3ab7babc86ddd54dcb145ada6e745ca0e6c8fd21 /lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
parentc5fe3ce2ec8b44b2cbab6fe5dc50633492fbd80d (diff)
downloadbcm5719-llvm-7c5310bbd3eeaa654f4f008e93f8a91cefe69c06.tar.gz
bcm5719-llvm-7c5310bbd3eeaa654f4f008e93f8a91cefe69c06.zip
[FileSystem] Remove GetPermissions() and Readable() from FileSpec
This patch removes the GetPermissions and GetReadable methods from FileSpec and updates its uses with calls to the FileSystem. Differential revision: https://reviews.llvm.org/D53831 llvm-svn: 345843
Diffstat (limited to 'lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp')
-rw-r--r--lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
index 3cced0c8b32..0016a5cd558 100644
--- a/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
+++ b/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp
@@ -143,8 +143,8 @@ PlatformPOSIX::ResolveExecutable(const ModuleSpec &module_spec,
if (resolved_module_spec.GetFileSpec().Exists())
error.Clear();
else {
- const uint32_t permissions =
- resolved_module_spec.GetFileSpec().GetPermissions();
+ const uint32_t permissions = FileSystem::Instance().GetPermissions(
+ resolved_module_spec.GetFileSpec());
if (permissions && (permissions & eFilePermissionsEveryoneR) == 0)
error.SetErrorStringWithFormat(
"executable '%s' is not readable",
@@ -237,7 +237,8 @@ PlatformPOSIX::ResolveExecutable(const ModuleSpec &module_spec,
}
if (error.Fail() || !exe_module_sp) {
- if (resolved_module_spec.GetFileSpec().Readable()) {
+ if (FileSystem::Instance().Readable(
+ resolved_module_spec.GetFileSpec())) {
error.SetErrorStringWithFormat(
"'%s' doesn't contain any '%s' platform architectures: %s",
resolved_module_spec.GetFileSpec().GetPath().c_str(),
OpenPOWER on IntegriCloud