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.
llvm-svn: 139983
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 4c99796..2786600 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -131,7 +131,8 @@
ModuleSP
Module::GetSP () const
{
- return ModuleList::GetModuleSP (this);
+ ModuleSP module_sp(const_cast<Module*>(this));
+ return module_sp;
}
const lldb_private::UUID&