summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBSourceManager.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/SBSourceManager.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/SBSourceManager.cpp')
-rw-r--r--lldb/source/API/SBSourceManager.cpp37
1 files changed, 23 insertions, 14 deletions
diff --git a/lldb/source/API/SBSourceManager.cpp b/lldb/source/API/SBSourceManager.cpp
index 701665edb46..32f792d8220 100644
--- a/lldb/source/API/SBSourceManager.cpp
+++ b/lldb/source/API/SBSourceManager.cpp
@@ -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;
-}
OpenPOWER on IntegriCloud