This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Use std::unique_ptr in dwarf2_read_debug_names
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
Simon> We maybe could add DISABLE_COPY_AND_ASSIGN to mapped_index_base, to ensure
Simon> we don't make copies of mapped_index/mapped_debug_names by mistake.
I also needed to default the no-arg constructor.
I'm checking it in with the appended addition.
Tom
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 9a77502826..49ce83ff20 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -147,6 +147,9 @@ struct name_component
struct mapped_index_base
{
+ mapped_index_base () = default;
+ DISABLE_COPY_AND_ASSIGN (mapped_index_base);
+
/* The name_component table (a sorted vector). See name_component's
description above. */
std::vector<name_component> name_components;