[Lldb-commits] [lldb] [lldb] refactor Target::Install function (PR #108996)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Thu Sep 19 06:27:05 PDT 2024
================
@@ -76,6 +76,79 @@
using namespace lldb;
using namespace lldb_private;
+namespace {
+
+struct ExecutableInstaller {
+
+ ExecutableInstaller(PlatformSP platform, ModuleSP module)
+ : m_platform{platform}, m_module{module},
+ m_local_file{m_module->GetFileSpec()},
+ m_remote_file{m_module->GetRemoteInstallFileSpec()} {}
+
+ void setRemoteFile() const { m_module->SetPlatformFileSpec(m_remote_file); }
+
+ PlatformSP m_platform;
+ ModuleSP m_module;
+ const FileSpec m_local_file;
+ const FileSpec m_remote_file;
+};
+
+struct MainExecutableInstaller {
+
+ MainExecutableInstaller(PlatformSP platform, TargetSP target, ModuleSP module,
----------------
DavidSpickett wrote:
I would put platform and module first, in the same order as ExecutableInstaller, then target and launch info. So that it's more clear what the extra parameters are.
https://github.com/llvm/llvm-project/pull/108996
More information about the lldb-commits
mailing list