Convert lldb::ModuleSP to use an instrusive ref counted pointer.
We had some cases where getting the shared pointer for a module from
the global module list was causing a performance issue when debugging
with DWARF in .o files. Now that the module uses intrusive ref counts,
we can easily convert any pointer to a shared pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139983 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Symbol/SymbolContext.cpp b/source/Symbol/SymbolContext.cpp
index 6d570d7..23722f6 100644
--- a/source/Symbol/SymbolContext.cpp
+++ b/source/Symbol/SymbolContext.cpp
@@ -82,6 +82,10 @@
sc_scope->CalculateSymbolContext (this);
}
+SymbolContext::~SymbolContext ()
+{
+}
+
const SymbolContext&
SymbolContext::operator= (const SymbolContext& rhs)
{
@@ -447,7 +451,7 @@
// for methods matching name.
}
- if (module_sp != NULL)
+ if (module_sp)
module_sp->FindFunctions (name, eFunctionNameTypeBase | eFunctionNameTypeFull, include_symbols, true, sc_list);
if (target_sp)
@@ -489,6 +493,24 @@
//
//----------------------------------------------------------------------
+SymbolContextSpecifier::SymbolContextSpecifier (const TargetSP &target_sp) :
+ m_target_sp (target_sp),
+ m_module_spec (),
+ m_module_sp (),
+ m_file_spec_ap (),
+ m_start_line (0),
+ m_end_line (0),
+ m_function_spec (),
+ m_class_name (),
+ m_address_range_ap (),
+ m_type (eNothingSpecified)
+{
+}
+
+SymbolContextSpecifier::~SymbolContextSpecifier()
+{
+}
+
bool
SymbolContextSpecifier::AddLineSpecification (uint32_t line_no, SpecificationType type)
{