diff options
author | Tom Tromey <tom@tromey.com> | 2022-05-21 09:50:13 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-05-31 14:46:11 -0600 |
commit | e2904e1ff0b0158cf6d8d335ca3f80ff7dc9eb6c (patch) | |
tree | a964217ffa81df1df4ec9236cb0a3696bf2ff3e4 /gdb/objfiles.h | |
parent | ebad7c66133526eb9ea9b21dad2df49a65200df0 (diff) | |
download | binutils-e2904e1ff0b0158cf6d8d335ca3f80ff7dc9eb6c.zip binutils-e2904e1ff0b0158cf6d8d335ca3f80ff7dc9eb6c.tar.gz binutils-e2904e1ff0b0158cf6d8d335ca3f80ff7dc9eb6c.tar.bz2 |
Use unique_ptr for objfiles
A while back, I changed objfiles to be held via a shared_ptr. The
idea at the time was that this was a step toward writing to the index
cache in the background, and this would let gdb keep a reference alive
to do so. However, since then we've rewritten the DWARF reader, and
the new index can do this without requiring a shared pointer -- in
fact there are patches pending to implement this.
This patch switches objfile management to unique_ptr, which makes more
sense now.
Regression tested on x86-64 Fedora 34.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r-- | gdb/objfiles.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h index 9da12ff..a7098b4 100644 --- a/gdb/objfiles.h +++ b/gdb/objfiles.h @@ -409,7 +409,7 @@ public: remove it from the program space's list. In some cases, you may need to hold a reference to an objfile that is independent of its existence on the program space's list; for this case, the - destructor must be public so that shared_ptr can reference + destructor must be public so that unique_ptr can reference it. */ ~objfile (); |