Author: Jonas Devlieghere Date: 2020-01-28T16:23:03-08:00 New Revision: 66dc467228789cbe94a125d7fdedf42556052ad3
URL: https://github.com/llvm/llvm-project/commit/66dc467228789cbe94a125d7fdedf42556052ad3 DIFF: https://github.com/llvm/llvm-project/commit/66dc467228789cbe94a125d7fdedf42556052ad3.diff LOG: [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. Added: Modified: lldb/include/lldb/API/SBPlatform.h lldb/source/API/SBPlatform.cpp Removed: ################################################################################ diff --git a/lldb/include/lldb/API/SBPlatform.h b/lldb/include/lldb/API/SBPlatform.h index 7207b2e2a78d..9e3d03e9a84f 100644 --- a/lldb/include/lldb/API/SBPlatform.h +++ b/lldb/include/lldb/API/SBPlatform.h @@ -89,6 +89,10 @@ class LLDB_API SBPlatform { SBPlatform(const char *platform_name); + SBPlatform(const SBPlatform &rhs); + + void operator=(const SBPlatform &rhs); + ~SBPlatform(); explicit operator bool() const; diff --git a/lldb/source/API/SBPlatform.cpp b/lldb/source/API/SBPlatform.cpp index 8f98d2d5e5a0..76b851517e36 100644 --- a/lldb/source/API/SBPlatform.cpp +++ b/lldb/source/API/SBPlatform.cpp @@ -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, ()); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits