#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"
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();