diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-01 17:09:25 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-01 17:09:25 +0000 |
commit | dbd7fabaa0ae01d3505d52e2be3d794f0dd74a93 (patch) | |
tree | 17f0843784cbfba88449a5ea5cca1a9cb35e3998 /lldb/source/Commands/CommandObjectTarget.cpp | |
parent | 2c22c800a0d049f6300dbf59b400aa1329c21971 (diff) | |
download | bcm5719-llvm-dbd7fabaa0ae01d3505d52e2be3d794f0dd74a93.tar.gz bcm5719-llvm-dbd7fabaa0ae01d3505d52e2be3d794f0dd74a93.zip |
[FileSystem] Remove Exists() from FileSpec
This patch removes the Exists method from FileSpec and updates its uses
with calls to the FileSystem.
Differential revision: https://reviews.llvm.org/D53845
llvm-svn: 345854
Diffstat (limited to 'lldb/source/Commands/CommandObjectTarget.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectTarget.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lldb/source/Commands/CommandObjectTarget.cpp b/lldb/source/Commands/CommandObjectTarget.cpp index 524df3a303d..de9526d94d4 100644 --- a/lldb/source/Commands/CommandObjectTarget.cpp +++ b/lldb/source/Commands/CommandObjectTarget.cpp @@ -274,7 +274,7 @@ protected: FileSpec remote_file(m_remote_file.GetOptionValue().GetCurrentValue()); if (core_file) { - if (!core_file.Exists()) { + if (!FileSystem::Instance().Exists(core_file)) { result.AppendErrorWithFormat("core file '%s' doesn't exist", core_file.GetPath().c_str()); result.SetStatus(eReturnStatusFailed); @@ -291,7 +291,7 @@ protected: if (argc == 1 || core_file || remote_file) { FileSpec symfile(m_symbol_file.GetOptionValue().GetCurrentValue()); if (symfile) { - if (symfile.Exists()) { + if (FileSystem::Instance().Exists(symfile)) { if (!FileSystem::Instance().Readable(symfile)) { result.AppendErrorWithFormat("symbol file '%s' is not readable", symfile.GetPath().c_str()); @@ -336,7 +336,7 @@ protected: if (remote_file) { if (platform_sp) { // I have a remote file.. two possible cases - if (file_spec && file_spec.Exists()) { + if (file_spec && FileSystem::Instance().Exists(file_spec)) { // if the remote file does not exist, push it there if (!platform_sp->GetFileExists(remote_file)) { Status err = platform_sp->PutFile(file_spec, remote_file); @@ -404,7 +404,7 @@ protected: if (core_file) { char core_path[PATH_MAX]; core_file.GetPath(core_path, sizeof(core_path)); - if (core_file.Exists()) { + if (FileSystem::Instance().Exists(core_file)) { if (!FileSystem::Instance().Readable(core_file)) { result.AppendMessageWithFormat( "Core file '%s' is not readable.\n", core_path); @@ -2533,7 +2533,7 @@ protected: continue; FileSpec file_spec(entry.ref, true); - if (file_spec.Exists()) { + if (FileSystem::Instance().Exists(file_spec)) { ModuleSpec module_spec(file_spec); if (m_uuid_option_group.GetOptionValue().OptionWasSet()) module_spec.GetUUID() = @@ -4255,7 +4255,8 @@ protected: ModuleSP frame_module_sp( frame->GetSymbolContext(eSymbolContextModule).module_sp); if (frame_module_sp) { - if (frame_module_sp->GetPlatformFileSpec().Exists()) { + if (FileSystem::Instance().Exists( + frame_module_sp->GetPlatformFileSpec())) { module_spec.GetArchitecture() = frame_module_sp->GetArchitecture(); module_spec.GetFileSpec() = @@ -4302,7 +4303,7 @@ protected: module_spec.GetArchitecture() = target->GetArchitecture(); } success |= module_spec.GetUUID().IsValid() || - module_spec.GetFileSpec().Exists(); + FileSystem::Instance().Exists(module_spec.GetFileSpec()); } } @@ -4362,7 +4363,8 @@ protected: } ArchSpec arch; - bool symfile_exists = module_spec.GetSymbolFileSpec().Exists(); + bool symfile_exists = + FileSystem::Instance().Exists(module_spec.GetSymbolFileSpec()); if (symfile_exists) { if (!AddModuleSymbols(target, module_spec, flush, result)) |