diff options
author | Greg Clayton <gclayton@apple.com> | 2011-09-17 06:21:20 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-09-17 06:21:20 +0000 |
commit | 747bcb03d25144951e24d957fc667bb497c88ed9 (patch) | |
tree | 95d335a5a28374feb2cd58cf629384d25287afe5 /lldb/source/Core/Module.cpp | |
parent | 5631ebce5e09cec5c1b6929f70847d3d2554728d (diff) | |
download | bcm5719-llvm-747bcb03d25144951e24d957fc667bb497c88ed9.tar.gz bcm5719-llvm-747bcb03d25144951e24d957fc667bb497c88ed9.zip |
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
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r-- | lldb/source/Core/Module.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp index 4c997969ea4..2786600b380 100644 --- a/lldb/source/Core/Module.cpp +++ b/lldb/source/Core/Module.cpp @@ -131,7 +131,8 @@ Module::~Module() ModuleSP Module::GetSP () const { - return ModuleList::GetModuleSP (this); + ModuleSP module_sp(const_cast<Module*>(this)); + return module_sp; } const lldb_private::UUID& |