[Lldb-commits] [lldb] r348207 - [FileSystem] Migrate MonitoringProcessLauncher
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 3 14:41:32 PST 2018
Author: jdevlieghere
Date: Mon Dec 3 14:41:32 2018
New Revision: 348207
URL: http://llvm.org/viewvc/llvm-project?rev=348207&view=rev
Log:
[FileSystem] Migrate MonitoringProcessLauncher
Use the FileSystem helpers instead of using the file system directly.
Modified:
lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp
Modified: lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp?rev=348207&r1=348206&r2=348207&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp (original)
+++ lldb/trunk/source/Host/common/MonitoringProcessLauncher.cpp Mon Dec 3 14:41:32 2018
@@ -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
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();
More information about the lldb-commits
mailing list