summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/SharingPtr.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-01-27 18:45:39 +0000
committerGreg Clayton <gclayton@apple.com>2012-01-27 18:45:39 +0000
commit29ad7b914f78c9d9dc1fc4a2f7a4d09ca7bc3f79 (patch)
treef3d0b6affdc53e46945374656c3193f64a5f8352 /lldb/source/Utility/SharingPtr.cpp
parent14a37ab64d2daf919d16494306ee1703ccae3ecd (diff)
downloadbcm5719-llvm-29ad7b914f78c9d9dc1fc4a2f7a4d09ca7bc3f79.tar.gz
bcm5719-llvm-29ad7b914f78c9d9dc1fc4a2f7a4d09ca7bc3f79.zip
Added a ModuleList::Destroy() method which will reclaim the std::vector
memory by doing a swap. Also added a few utilty functions that can be enabled for debugging issues with modules staying around too long when external clients still have references to them. llvm-svn: 149138
Diffstat (limited to 'lldb/source/Utility/SharingPtr.cpp')
-rw-r--r--lldb/source/Utility/SharingPtr.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/lldb/source/Utility/SharingPtr.cpp b/lldb/source/Utility/SharingPtr.cpp
index 36c79b4b1f3..f64d7e3995b 100644
--- a/lldb/source/Utility/SharingPtr.cpp
+++ b/lldb/source/Utility/SharingPtr.cpp
@@ -111,11 +111,16 @@ extern "C" void track_sp (void *sp_this, void *ptr, long use_count)
}
}
}
-extern "C" void dump_sp_refs (void *ptr)
-{
- // Use a specially crafted call to "track_sp" which will
- // dump info on all live shared pointers that reference "ptr"
- track_sp (NULL, ptr, 0);
+// Put dump_sp_refs in the lldb namespace to it gets through our exports lists filter in the LLDB.framework or lldb.so
+namespace lldb {
+
+ void dump_sp_refs (void *ptr)
+ {
+ // Use a specially crafted call to "track_sp" which will
+ // dump info on all live shared pointers that reference "ptr"
+ track_sp (NULL, ptr, 0);
+ }
+
}
#endif
OpenPOWER on IntegriCloud