diff --git a/lldb/include/lldb/API/SBCommandInterpreterRunOptions.h b/lldb/include/lldb/API/SBCommandInterpreterRunOptions.h index 82d6feedc02e..3c00513faaa7 100644 --- a/lldb/include/lldb/API/SBCommandInterpreterRunOptions.h +++ b/lldb/include/lldb/API/SBCommandInterpreterRunOptions.h @@ -26,8 +26,12 @@ class LLDB_API SBCommandInterpreterRunOptions { public: SBCommandInterpreterRunOptions(); + SBCommandInterpreterRunOptions(const SBCommandInterpreterRunOptions &rhs); ~SBCommandInterpreterRunOptions(); + SBCommandInterpreterRunOptions & + operator=(const SBCommandInterpreterRunOptions &rhs); + bool GetStopOnContinue() const; void SetStopOnContinue(bool); diff --git a/lldb/source/API/SBCommandInterpreterRunOptions.cpp b/lldb/source/API/SBCommandInterpreterRunOptions.cpp index fcfbf5e5401a..da800e8b7804 100644 --- a/lldb/source/API/SBCommandInterpreterRunOptions.cpp +++ b/lldb/source/API/SBCommandInterpreterRunOptions.cpp @@ -24,8 +24,29 @@ SBCommandInterpreterRunOptions::SBCommandInterpreterRunOptions() { m_opaque_up = std::make_unique(); } +SBCommandInterpreterRunOptions::SBCommandInterpreterRunOptions( + const SBCommandInterpreterRunOptions &rhs) + : m_opaque_up() { + LLDB_RECORD_CONSTRUCTOR(SBCommandInterpreterRunOptions, + (const lldb::SBCommandInterpreterRunOptions &), rhs); + + m_opaque_up = std::make_unique(rhs.ref()); +} + SBCommandInterpreterRunOptions::~SBCommandInterpreterRunOptions() = default; +SBCommandInterpreterRunOptions &SBCommandInterpreterRunOptions::operator=( + const SBCommandInterpreterRunOptions &rhs) { + LLDB_RECORD_METHOD(lldb::SBCommandInterpreterRunOptions &, + SBCommandInterpreterRunOptions, operator=, + (const lldb::SBCommandInterpreterRunOptions &), rhs); + + if (this == &rhs) + return LLDB_RECORD_RESULT(*this); + *m_opaque_up = *rhs.m_opaque_up; + return LLDB_RECORD_RESULT(*this); +} + bool SBCommandInterpreterRunOptions::GetStopOnContinue() const { LLDB_RECORD_METHOD_CONST_NO_ARGS(bool, SBCommandInterpreterRunOptions, GetStopOnContinue); @@ -190,12 +211,11 @@ SBCommandInterpreterRunResult::~SBCommandInterpreterRunResult() = default; SBCommandInterpreterRunResult &SBCommandInterpreterRunResult::operator=( const SBCommandInterpreterRunResult &rhs) { LLDB_RECORD_METHOD(lldb::SBCommandInterpreterRunResult &, - SBCommandInterpreterRunResult, - operator=,(const lldb::SBCommandInterpreterRunResult &), - rhs); + SBCommandInterpreterRunResult, operator=, + (const lldb::SBCommandInterpreterRunResult &), rhs); if (this == &rhs) - return *this; + return LLDB_RECORD_RESULT(*this); *m_opaque_up = *rhs.m_opaque_up; return LLDB_RECORD_RESULT(*this); } @@ -220,6 +240,11 @@ namespace repro { template <> void RegisterMethods(Registry &R) { LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreterRunOptions, ()); + LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreterRunOptions, + (const lldb::SBCommandInterpreterRunOptions &)); + LLDB_REGISTER_METHOD(lldb::SBCommandInterpreterRunOptions &, + SBCommandInterpreterRunOptions, operator=, + (const lldb::SBCommandInterpreterRunOptions &)); LLDB_REGISTER_METHOD_CONST(bool, SBCommandInterpreterRunOptions, GetStopOnContinue, ()); LLDB_REGISTER_METHOD(void, SBCommandInterpreterRunOptions, SetStopOnContinue, @@ -260,8 +285,8 @@ template <> void RegisterMethods(Registry &R) { LLDB_REGISTER_CONSTRUCTOR(SBCommandInterpreterRunResult, (const lldb::SBCommandInterpreterRunResult &)); LLDB_REGISTER_METHOD(lldb::SBCommandInterpreterRunResult &, - SBCommandInterpreterRunResult, - operator=,(const lldb::SBCommandInterpreterRunResult &)); + SBCommandInterpreterRunResult, operator=, + (const lldb::SBCommandInterpreterRunResult &)); LLDB_REGISTER_METHOD_CONST(int, SBCommandInterpreterRunResult, GetNumberOfErrors, ()); LLDB_REGISTER_METHOD_CONST(lldb::CommandInterpreterResult,