Change objfile::partial_symtabs to be a unique_ptr
authorTom Tromey <tom@tromey.com>
Sun, 3 Nov 2019 22:22:01 +0000 (15:22 -0700)
committerTom Tromey <tom@tromey.com>
Thu, 12 Dec 2019 22:50:57 +0000 (15:50 -0700)
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

gdb/ChangeLog
gdb/objfiles.h

index 8c26bb06add7d6ffde035cfa4e68314c895a685b..ecd21247200688dc26a35a05139dcf799cff04ad 100644 (file)
@@ -1,3 +1,8 @@
+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.
index f0ee8037b6ddc374afef244479dafb71d57bdb15..9a433ddd7b043b4c7c1c137d395f93155b903bc6 100644 (file)
@@ -518,7 +518,7 @@ public:
 
   /* 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.  */
This page took 0.029735 seconds and 4 git commands to generate.