mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
[lldb/API] Fix bogus copy assignment operator
The copy assignment operator is supposed to return the class and not void. Fix the methods and the reproducer instrumentation macros.
This commit is contained in:
1 parent
a9bc7b83a4
commit
ede5cd9a45
4 files changed
+36
-14
No files matched your search
@@ -80,14 +80,16 @@ SBPlatformConnectOptions::SBPlatformConnectOptions(
|
||||
|
||||
SBPlatformConnectOptions::~SBPlatformConnectOptions() { delete m_opaque_ptr; }
|
||||
|
||||
void SBPlatformConnectOptions::operator=(const SBPlatformConnectOptions &rhs) {
|
||||
SBPlatformConnectOptions &SBPlatformConnectOptions::
|
||||
operator=(const SBPlatformConnectOptions &rhs) {
|
||||
LLDB_RECORD_METHOD(
|
||||
void,
|
||||
SBPlatformConnectOptions &,
|
||||
SBPlatformConnectOptions, operator=,(
|
||||
const lldb::SBPlatformConnectOptions &),
|
||||
rhs);
|
||||
|
||||
*m_opaque_ptr = *rhs.m_opaque_ptr;
|
||||
return LLDB_RECORD_RESULT(*this);
|
||||
}
|
||||
|
||||
const char *SBPlatformConnectOptions::GetURL() {
|
||||
@@ -174,6 +176,18 @@ SBPlatformShellCommand::SBPlatformShellCommand(
|
||||
*m_opaque_ptr = *rhs.m_opaque_ptr;
|
||||
}
|
||||
|
||||
SBPlatformShellCommand &SBPlatformShellCommand::
|
||||
operator=(const SBPlatformShellCommand &rhs) {
|
||||
|
||||
LLDB_RECORD_METHOD(
|
||||
SBPlatformShellCommand &,
|
||||
SBPlatformShellCommand, operator=,(const lldb::SBPlatformShellCommand &),
|
||||
rhs);
|
||||
|
||||
*m_opaque_ptr = *rhs.m_opaque_ptr;
|
||||
return LLDB_RECORD_RESULT(*this);
|
||||
}
|
||||
|
||||
SBPlatformShellCommand::~SBPlatformShellCommand() { delete m_opaque_ptr; }
|
||||
|
||||
void SBPlatformShellCommand::Clear() {
|
||||
@@ -279,11 +293,12 @@ SBPlatform::SBPlatform(const SBPlatform &rhs) {
|
||||
m_opaque_sp = rhs.m_opaque_sp;
|
||||
}
|
||||
|
||||
void SBPlatform::operator=(const SBPlatform &rhs) {
|
||||
LLDB_RECORD_METHOD(void, SBPlatform, operator=,(const lldb::SBPlatform &),
|
||||
rhs);
|
||||
SBPlatform &SBPlatform::operator=(const SBPlatform &rhs) {
|
||||
LLDB_RECORD_METHOD(SBPlatform &,
|
||||
SBPlatform, operator=,(const lldb::SBPlatform &), rhs);
|
||||
|
||||
m_opaque_sp = rhs.m_opaque_sp;
|
||||
return LLDB_RECORD_RESULT(*this);
|
||||
}
|
||||
|
||||
SBPlatform::~SBPlatform() {}
|
||||
@@ -637,7 +652,7 @@ void RegisterMethods<SBPlatformConnectOptions>(Registry &R) {
|
||||
LLDB_REGISTER_CONSTRUCTOR(SBPlatformConnectOptions,
|
||||
(const lldb::SBPlatformConnectOptions &));
|
||||
LLDB_REGISTER_METHOD(
|
||||
void,
|
||||
SBPlatformConnectOptions &,
|
||||
SBPlatformConnectOptions, operator=,(
|
||||
const lldb::SBPlatformConnectOptions &));
|
||||
LLDB_REGISTER_METHOD(const char *, SBPlatformConnectOptions, GetURL, ());
|
||||
@@ -658,6 +673,9 @@ void RegisterMethods<SBPlatformShellCommand>(Registry &R) {
|
||||
LLDB_REGISTER_CONSTRUCTOR(SBPlatformShellCommand, (const char *));
|
||||
LLDB_REGISTER_CONSTRUCTOR(SBPlatformShellCommand,
|
||||
(const lldb::SBPlatformShellCommand &));
|
||||
LLDB_REGISTER_METHOD(
|
||||
SBPlatformShellCommand &,
|
||||
SBPlatformShellCommand, operator=,(const lldb::SBPlatformShellCommand &));
|
||||
LLDB_REGISTER_METHOD(void, SBPlatformShellCommand, Clear, ());
|
||||
LLDB_REGISTER_METHOD(const char *, SBPlatformShellCommand, GetCommand, ());
|
||||
LLDB_REGISTER_METHOD(void, SBPlatformShellCommand, SetCommand,
|
||||
@@ -680,7 +698,8 @@ void RegisterMethods<SBPlatform>(Registry &R) {
|
||||
LLDB_REGISTER_CONSTRUCTOR(SBPlatform, ());
|
||||
LLDB_REGISTER_CONSTRUCTOR(SBPlatform, (const char *));
|
||||
LLDB_REGISTER_CONSTRUCTOR(SBPlatform, (const lldb::SBPlatform &));
|
||||
LLDB_REGISTER_METHOD(void, SBPlatform, operator=,(const lldb::SBPlatform &));
|
||||
LLDB_REGISTER_METHOD(SBPlatform &,
|
||||
SBPlatform, operator=,(const lldb::SBPlatform &));
|
||||
LLDB_REGISTER_METHOD_CONST(bool, SBPlatform, IsValid, ());
|
||||
LLDB_REGISTER_METHOD_CONST(bool, SBPlatform, operator bool, ());
|
||||
LLDB_REGISTER_METHOD(void, SBPlatform, Clear, ());
|
||||
|
||||
Reference in new issue
Block a user