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.
git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@149138 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Utility/SharingPtr.cpp b/source/Utility/SharingPtr.cpp
index 36c79b4..f64d7e3 100644
--- a/source/Utility/SharingPtr.cpp
+++ b/source/Utility/SharingPtr.cpp
@@ -111,11 +111,16 @@
}
}
}
-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