mirror of
https://github.com/intel/llvm.git
synced 2026-01-17 14:48:27 +08:00
Added copy constructors and assignment operators to all lldb::SB* classes
so we don't end up with weak exports with some compilers. llvm-svn: 118312
This commit is contained in:
@@ -21,6 +21,27 @@ SBCommandReturnObject::SBCommandReturnObject () :
|
||||
{
|
||||
}
|
||||
|
||||
SBCommandReturnObject::SBCommandReturnObject (const SBCommandReturnObject &rhs):
|
||||
m_opaque_ap ()
|
||||
{
|
||||
if (rhs.m_opaque_ap.get())
|
||||
m_opaque_ap.reset (new CommandReturnObject (*rhs.m_opaque_ap));
|
||||
}
|
||||
|
||||
const SBCommandReturnObject &
|
||||
SBCommandReturnObject::operator = (const SBCommandReturnObject &rhs)
|
||||
{
|
||||
if (this != &rhs)
|
||||
{
|
||||
if (rhs.m_opaque_ap.get())
|
||||
m_opaque_ap.reset (new CommandReturnObject (*rhs.m_opaque_ap));
|
||||
else
|
||||
m_opaque_ap.reset();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
SBCommandReturnObject::~SBCommandReturnObject ()
|
||||
{
|
||||
// m_opaque_ap will automatically delete any pointer it owns
|
||||
|
||||
Reference in New Issue
Block a user