[pushed] Change objfile::partial_symtabs to be a unique_ptr
Commit Message
The original change was created by Tom Tromey.
Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/502
......................................................................
Change objfile::partial_symtabs to be a unique_ptr
A plan I had a while ago was to write the DWARF index in a worker
thread. This is why objfile::partial_symtabs is a shared_ptr.
However, it turned out that doing this required keeping the objfile
alive as well. Now that objfiles are managed using shared_ptr,
there's no need for partial_symtabs to be one as well, so this patch
reverts that change.
gdb/ChangeLog
2019-12-12 Tom Tromey <tom@tromey.com>
* objfiles.h (struct objfile) <partial_symtabs>: Now a
unique_ptr.
Change-Id: I3d7831006c40d4c8f3173ba51c0c1b0a32021ae5
---
M gdb/ChangeLog
M gdb/objfiles.h
2 files changed, 6 insertions(+), 1 deletion(-)
@@ -1,5 +1,10 @@
2019-12-12 Tom Tromey <tom@tromey.com>
+ * objfiles.h (struct objfile) <partial_symtabs>: Now a
+ unique_ptr.
+
+2019-12-12 Tom Tromey <tom@tromey.com>
+
* progspace.h (objfile_list): New typedef.
(class unwrapping_objfile_iterator)
(struct unwrapping_objfile_range): Newl
@@ -518,7 +518,7 @@
/* The partial symbol tables. */
- std::shared_ptr<psymtab_storage> partial_symtabs;
+ std::unique_ptr<psymtab_storage> partial_symtabs;
/* The object file's BFD. Can be null if the objfile contains only
minimal symbols, e.g. the run time common symbols for SunOS4. */