diff options
Diffstat (limited to 'lldb/source/API/SBSourceManager.cpp')
-rw-r--r-- | lldb/source/API/SBSourceManager.cpp | 37 |
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; -} |