diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-03 22:41:32 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-12-03 22:41:32 +0000 |
commit | 0bbe9a7a98083f9ea036f602e0bed65e2f3ccc6d (patch) | |
tree | 7a4385d18332c418d3873cb1837fa94307669aea /lldb/source/Host/common/MonitoringProcessLauncher.cpp | |
parent | 44c1f81b27cfc183b6e1cde50942a0eb3d62a03b (diff) | |
download | bcm5719-llvm-0bbe9a7a98083f9ea036f602e0bed65e2f3ccc6d.tar.gz bcm5719-llvm-0bbe9a7a98083f9ea036f602e0bed65e2f3ccc6d.zip |
[FileSystem] Migrate MonitoringProcessLauncher
Use the FileSystem helpers instead of using the file system directly.
llvm-svn: 348207
Diffstat (limited to 'lldb/source/Host/common/MonitoringProcessLauncher.cpp')
-rw-r--r-- | lldb/source/Host/common/MonitoringProcessLauncher.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/lldb/source/Host/common/MonitoringProcessLauncher.cpp b/lldb/source/Host/common/MonitoringProcessLauncher.cpp index 6b7b18bf8df..f6f772cb367 100644 --- a/lldb/source/Host/common/MonitoringProcessLauncher.cpp +++ b/lldb/source/Host/common/MonitoringProcessLauncher.cpp @@ -12,7 +12,6 @@ #include "lldb/Host/HostProcess.h" #include "lldb/Target/ProcessLaunchInfo.h" #include "lldb/Utility/Log.h" -#include "lldb/Utility/Status.h" #include "llvm/Support/FileSystem.h" @@ -30,20 +29,16 @@ MonitoringProcessLauncher::LaunchProcess(const ProcessLaunchInfo &launch_info, error.Clear(); + FileSystem &fs = FileSystem::Instance(); FileSpec exe_spec(resolved_info.GetExecutableFile()); - llvm::sys::fs::file_status stats; - status(exe_spec.GetPath(), stats); - if (!exists(stats)) { + if (!fs.Exists(exe_spec)) FileSystem::Instance().Resolve(exe_spec); - status(exe_spec.GetPath(), stats); - } - if (!exists(stats)) { + + if (!fs.Exists(exe_spec)) FileSystem::Instance().ResolveExecutableLocation(exe_spec); - status(exe_spec.GetPath(), stats); - } - if (!exists(stats)) { + if (!fs.Exists(exe_spec)) { error.SetErrorStringWithFormatv("executable doesn't exist: '{0}'", exe_spec); return HostProcess(); |