summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBStringList.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-11-05 23:17:00 +0000
committerGreg Clayton <gclayton@apple.com>2010-11-05 23:17:00 +0000
commitefabb123aff69b36b3cd610ad9b98aafb6bc799d (patch)
tree94de36ae7b2cb915aded3ae58eee86c9e4b690c7 /lldb/source/API/SBStringList.cpp
parent2db0ea03ba60111bcf417f1a12e8781425ec276a (diff)
downloadbcm5719-llvm-efabb123aff69b36b3cd610ad9b98aafb6bc799d.tar.gz
bcm5719-llvm-efabb123aff69b36b3cd610ad9b98aafb6bc799d.zip
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
Diffstat (limited to 'lldb/source/API/SBStringList.cpp')
-rw-r--r--lldb/source/API/SBStringList.cpp20
1 files changed, 11 insertions, 9 deletions
diff --git a/lldb/source/API/SBStringList.cpp b/lldb/source/API/SBStringList.cpp
index beb760632fa..129d2f4c11f 100644
--- a/lldb/source/API/SBStringList.cpp
+++ b/lldb/source/API/SBStringList.cpp
@@ -34,21 +34,23 @@ SBStringList::SBStringList (const SBStringList &rhs) :
}
-
-SBStringList::~SBStringList ()
-{
-}
-
-
const SBStringList &
SBStringList::operator = (const SBStringList &rhs)
{
- if (rhs.IsValid())
- m_opaque_ap.reset (new lldb_private::StringList(*rhs));
-
+ if (this != &rhs)
+ {
+ if (rhs.IsValid())
+ m_opaque_ap.reset(new lldb_private::StringList(*rhs));
+ else
+ m_opaque_ap.reset();
+ }
return *this;
}
+SBStringList::~SBStringList ()
+{
+}
+
const lldb_private::StringList *
SBStringList::operator->() const
{
OpenPOWER on IntegriCloud