]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
Use new for ada_symbol_cache
authorTom Tromey <tromey@adacore.com>
Tue, 2 Mar 2021 20:00:45 +0000 (13:00 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 2 Mar 2021 20:00:45 +0000 (13:00 -0700)
commitbdcccc56393c26b86265f94d4fcf55c20c938ab7
tree9818ccbb3b290953aaee11b1828d5baf62084698
parent1228719f312c22a3ce4ade10d175b80ac5cedb08
Use new for ada_symbol_cache

This changes the ada_symbol_cache to be allocated with 'new' and
managed via unique_ptr.  This simplifies the code somewhat.  Also,
ada_clear_symbol_cache is changed so that it does not allocate a
symbol cache just to clear it.

gdb/ChangeLog
2021-03-02  Tom Tromey  <tromey@adacore.com>

* ada-lang.c (struct ada_symbol_cache) <cache_space>: Now an
auto_obstack.
<root>: Initialize.
(ada_pspace_data): Remove destructor.
<sym_cache>: Now a unique_ptr.
(ada_init_symbol_cache, ada_free_symbol_cache): Remove.
(ada_get_symbol_cache): Use 'new'.
(ada_clear_symbol_cache): Rewrite.
gdb/ChangeLog
gdb/ada-lang.c