[lldb] Add copy ctor/assignment operator to SBCommandInterpreterRunOptions

This commit is contained in:
Jonas Devlieghere 2020-07-30 10:34:32 -07:00
parent be198e03eb
commit 41909e9682
2 changed files with 35 additions and 6 deletions

View File

@ -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);

View File

@ -24,8 +24,29 @@ SBCommandInterpreterRunOptions::SBCommandInterpreterRunOptions() {
m_opaque_up = std::make_unique<CommandInterpreterRunOptions>();
}
SBCommandInterpreterRunOptions::SBCommandInterpreterRunOptions(
const SBCommandInterpreterRunOptions &rhs)
: m_opaque_up() {
LLDB_RECORD_CONSTRUCTOR(SBCommandInterpreterRunOptions,
(const lldb::SBCommandInterpreterRunOptions &), rhs);
m_opaque_up = std::make_unique<CommandInterpreterRunOptions>(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<SBCommandInterpreterRunOptions>(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<SBCommandInterpreterRunOptions>(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,