diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-29 17:44:57 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2022-04-20 09:10:03 -0600 |
commit | 6555809e3e5ca516c7c1ffca494118ec7fd16934 (patch) | |
tree | 4087b99c00b880f508de787154db44da3251a7ad /gdb | |
parent | 20386fa32d589332a1d8e6f93ad97392218607c5 (diff) | |
download | gdb-6555809e3e5ca516c7c1ffca494118ec7fd16934.zip gdb-6555809e3e5ca516c7c1ffca494118ec7fd16934.tar.gz gdb-6555809e3e5ca516c7c1ffca494118ec7fd16934.tar.bz2 |
Give mapped_index_base a virtual destructor
This changes mapped_index_base to have a virtual destructor, so it can
be destroyed via its base class.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/dwarf2/mapped-index.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/dwarf2/mapped-index.h b/gdb/dwarf2/mapped-index.h index c2ff27a..fb6828e 100644 --- a/gdb/dwarf2/mapped-index.h +++ b/gdb/dwarf2/mapped-index.h @@ -53,6 +53,7 @@ struct name_component struct mapped_index_base { mapped_index_base () = default; + virtual ~mapped_index_base() = default; DISABLE_COPY_AND_ASSIGN (mapped_index_base); /* The name_component table (a sorted vector). See name_component's @@ -88,10 +89,6 @@ struct mapped_index_base find_name_components_bounds (const lookup_name_info &ln_no_params, enum language lang, dwarf2_per_objfile *per_objfile) const; - - /* Prevent deleting/destroying via a base class pointer. */ -protected: - ~mapped_index_base() = default; }; #endif /* GDB_DWARF2_MAPPED_INDEX_H */ |