diff options
-rw-r--r-- | lldb/source/Host/android/HostInfoAndroid.cpp | 7 | ||||
-rw-r--r-- | lldb/source/Host/linux/HostInfoLinux.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Host/windows/Host.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp | 3 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp | 3 |
5 files changed, 13 insertions, 8 deletions
diff --git a/lldb/source/Host/android/HostInfoAndroid.cpp b/lldb/source/Host/android/HostInfoAndroid.cpp index a9603328321..fb23878a1dd 100644 --- a/lldb/source/Host/android/HostInfoAndroid.cpp +++ b/lldb/source/Host/android/HostInfoAndroid.cpp @@ -8,6 +8,7 @@ //===----------------------------------------------------------------------===// #include "lldb/Host/android/HostInfoAndroid.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Host/linux/HostInfoLinux.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringRef.h" @@ -68,7 +69,7 @@ FileSpec HostInfoAndroid::ResolveLibraryPath(const std::string &module_path, FileSpec file_candidate(path.str().c_str(), true); file_candidate.AppendPathComponent(module_path.c_str()); - if (file_candidate.Exists()) + if (FileSystem::Instance().Exists(file_candidate)) return file_candidate; } @@ -83,8 +84,8 @@ bool HostInfoAndroid::ComputeTempFileBaseDirectory(FileSpec &file_spec) { // algorithm will deduce /tmp, which is plain wrong. In that case we have an // invalid directory, we substitute the path with /data/local/tmp, which is // correct at least in some cases (i.e., when running as shell user). - if (!success || !file_spec.Exists()) + if (!success || !FileSystem::Instance().Exists(file_spec)) file_spec = FileSpec("/data/local/tmp", false); - return file_spec.Exists(); + return FileSystem::Instance().Exists(file_spec); } diff --git a/lldb/source/Host/linux/HostInfoLinux.cpp b/lldb/source/Host/linux/HostInfoLinux.cpp index 1d95010e2f7..12885756e2b 100644 --- a/lldb/source/Host/linux/HostInfoLinux.cpp +++ b/lldb/source/Host/linux/HostInfoLinux.cpp @@ -7,8 +7,9 @@ // //===----------------------------------------------------------------------===// -#include "lldb/Host/Config.h" #include "lldb/Host/linux/HostInfoLinux.h" +#include "lldb/Host/Config.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Utility/Log.h" #include "llvm/Support/Threading.h" @@ -179,7 +180,7 @@ FileSpec HostInfoLinux::GetProgramFileSpec() { bool HostInfoLinux::ComputeSupportExeDirectory(FileSpec &file_spec) { if (HostInfoPosix::ComputeSupportExeDirectory(file_spec) && - file_spec.IsAbsolute() && file_spec.Exists()) + file_spec.IsAbsolute() && FileSystem::Instance().Exists(file_spec)) return true; file_spec.GetDirectory() = GetProgramFileSpec().GetDirectory(); return !file_spec.GetDirectory().IsEmpty(); diff --git a/lldb/source/Host/windows/Host.cpp b/lldb/source/Host/windows/Host.cpp index cc6c454d36b..452502d3372 100644 --- a/lldb/source/Host/windows/Host.cpp +++ b/lldb/source/Host/windows/Host.cpp @@ -15,6 +15,7 @@ // C++ Includes // Other libraries and framework includes // Project includes +#include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" #include "lldb/Host/HostInfo.h" #include "lldb/Target/Process.h" @@ -189,7 +190,7 @@ Status Host::ShellExpandArguments(ProcessLaunchInfo &launch_info) { return error; } expand_tool_spec.AppendPathComponent("lldb-argdumper.exe"); - if (!expand_tool_spec.Exists()) { + if (!FileSystem::Instance().Exists(expand_tool_spec)) { error.SetErrorString("could not find the lldb-argdumper tool"); return error; } diff --git a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp index d21adc2b691..6f96ae66a1b 100644 --- a/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp +++ b/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp @@ -24,6 +24,7 @@ // Other libraries and framework includes #include "lldb/Core/PluginManager.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Host/Host.h" #include "lldb/Symbol/ObjectFile.h" #include "lldb/Target/DynamicLoader.h" @@ -287,7 +288,7 @@ bool ProcessFreeBSD::CanDebug(lldb::TargetSP target_sp, // For now we are just making sure the file exists for a given module ModuleSP exe_module_sp(target_sp->GetExecutableModule()); if (exe_module_sp.get()) - return exe_module_sp->GetFileSpec().Exists(); + return FileSystem::Instance()::Exists(exe_module_sp->GetFileSpec()); // If there is no executable module, we return true since we might be // preparing to attach. return true; diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp index 33f4bc38e27..93f44113737 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -18,6 +18,7 @@ #include "lldb/Core/ModuleSpec.h" #include "lldb/Core/PluginManager.h" #include "lldb/Core/Section.h" +#include "lldb/Host/FileSystem.h" #include "lldb/Host/HostNativeProcessBase.h" #include "lldb/Host/HostProcess.h" #include "lldb/Host/windows/HostThreadWindows.h" @@ -591,7 +592,7 @@ bool ProcessWindows::CanDebug(lldb::TargetSP target_sp, // For now we are just making sure the file exists for a given module ModuleSP exe_module_sp(target_sp->GetExecutableModule()); if (exe_module_sp.get()) - return exe_module_sp->GetFileSpec().Exists(); + return FileSystem::Instance().Exists(exe_module_sp->GetFileSpec()); // However, if there is no executable module, we return true since we might // be preparing to attach. return true; |