summaryrefslogtreecommitdiff
path: root/source/Host/common/MonitoringProcessLauncher.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2019-01-19 10:06:29 +0000
committerDimitry Andric <dim@FreeBSD.org>2019-01-19 10:06:29 +0000
commit94994d372d014ce4c8758b9605d63fae651bd8aa (patch)
tree51c0b708bd59f205d6b35cb2a8c24d62f0c33d77 /source/Host/common/MonitoringProcessLauncher.cpp
parent39be7ce23363d12ae3e49aeb1fdb2bfeb892e836 (diff)
Notes
Diffstat (limited to 'source/Host/common/MonitoringProcessLauncher.cpp')
-rw-r--r--source/Host/common/MonitoringProcessLauncher.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/source/Host/common/MonitoringProcessLauncher.cpp b/source/Host/common/MonitoringProcessLauncher.cpp
index 76c11454f573..f6f772cb3679 100644
--- a/source/Host/common/MonitoringProcessLauncher.cpp
+++ b/source/Host/common/MonitoringProcessLauncher.cpp
@@ -8,10 +8,10 @@
//===----------------------------------------------------------------------===//
#include "lldb/Host/MonitoringProcessLauncher.h"
+#include "lldb/Host/FileSystem.h"
#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"
@@ -29,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)) {
- exe_spec.ResolvePath();
- status(exe_spec.GetPath(), stats);
- }
- if (!exists(stats)) {
- exe_spec.ResolveExecutableLocation();
- status(exe_spec.GetPath(), stats);
- }
+ if (!fs.Exists(exe_spec))
+ FileSystem::Instance().Resolve(exe_spec);
+
+ if (!fs.Exists(exe_spec))
+ FileSystem::Instance().ResolveExecutableLocation(exe_spec);
- if (!exists(stats)) {
+ if (!fs.Exists(exe_spec)) {
error.SetErrorStringWithFormatv("executable doesn't exist: '{0}'",
exe_spec);
return HostProcess();