forked from OSchip/llvm-project
[lldb/API] Implement the copy (assignment) constructor for SBPlatform
Currently the constructor is compiler generated which means it doesn't get instrumented for the reproducers.
This commit is contained in:
parent
ce70eb76ea
commit
66dc467228
|
@ -89,6 +89,10 @@ public:
|
|||
|
||||
SBPlatform(const char *platform_name);
|
||||
|
||||
SBPlatform(const SBPlatform &rhs);
|
||||
|
||||
void operator=(const SBPlatform &rhs);
|
||||
|
||||
~SBPlatform();
|
||||
|
||||
explicit operator bool() const;
|
||||
|
|
|
@ -273,6 +273,19 @@ SBPlatform::SBPlatform(const char *platform_name) : m_opaque_sp() {
|
|||
m_opaque_sp = Platform::Create(ConstString(platform_name), error);
|
||||
}
|
||||
|
||||
SBPlatform::SBPlatform(const SBPlatform &rhs) {
|
||||
LLDB_RECORD_CONSTRUCTOR(SBPlatform, (const lldb::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);
|
||||
|
||||
m_opaque_sp = rhs.m_opaque_sp;
|
||||
}
|
||||
|
||||
SBPlatform::~SBPlatform() {}
|
||||
|
||||
bool SBPlatform::IsValid() const {
|
||||
|
@ -666,6 +679,8 @@ template <>
|
|||
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_CONST(bool, SBPlatform, IsValid, ());
|
||||
LLDB_REGISTER_METHOD_CONST(bool, SBPlatform, operator bool, ());
|
||||
LLDB_REGISTER_METHOD(void, SBPlatform, Clear, ());
|
||||
|
|
Loading…
Reference in New Issue