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:
Greg Clayton
2010-11-05 23:17:00 +00:00
parent 2db0ea03ba
commit efabb123af
50 changed files with 585 additions and 146 deletions

View File

@@ -20,8 +20,8 @@ using namespace lldb;
using namespace lldb_private;
SBSourceManager::SBSourceManager (SourceManager& source_manager) :
m_opaque_ref (source_manager)
SBSourceManager::SBSourceManager (SourceManager* source_manager) :
m_opaque_ptr (source_manager)
{
}
@@ -29,6 +29,18 @@ SBSourceManager::~SBSourceManager()
{
}
SBSourceManager::SBSourceManager(const SBSourceManager &rhs) :
m_opaque_ptr (rhs.m_opaque_ptr)
{
}
const SBSourceManager &
SBSourceManager::operator = (const SBSourceManager &rhs)
{
m_opaque_ptr = rhs.m_opaque_ptr;
return *this;
}
size_t
SBSourceManager::DisplaySourceLinesWithLineNumbers
(
@@ -40,6 +52,9 @@ SBSourceManager::DisplaySourceLinesWithLineNumbers
FILE *f
)
{
if (m_opaque_ptr == NULL)
return 0;
if (f == NULL)
return 0;
@@ -48,18 +63,12 @@ SBSourceManager::DisplaySourceLinesWithLineNumbers
StreamFile str (f);
return m_opaque_ref.DisplaySourceLinesWithLineNumbers (*file,
line,
context_before,
context_after,
current_line_cstr,
&str);
return m_opaque_ptr->DisplaySourceLinesWithLineNumbers (*file,
line,
context_before,
context_after,
current_line_cstr,
&str);
}
return 0;
}
SourceManager &
SBSourceManager::GetLLDBManager ()
{
return m_opaque_ref;
}