gdb: add and use signatured_type_up

Add an alias for std::unique_ptr<signatured_type> and use it where
possible.

gdb/ChangeLog:

	* dwarf2/read.h (signatured_type_up): New, use where possible.

Change-Id: I5a41e8345551434c8beeb9f269b03bdcf27989be
This commit is contained in:
Simon Marchi 2021-05-31 12:33:32 -04:00
parent 4631503b28
commit 46c6bcf650
3 changed files with 13 additions and 7 deletions

View file

@ -305,6 +305,8 @@ struct signatured_type : public dwarf2_per_cu_data
struct dwo_unit *dwo_unit = nullptr;
};
using signatured_type_up = std::unique_ptr<signatured_type>;
/* Some DWARF data can be shared across objfiles who share the same BFD,
this data is stored in this object.
@ -339,7 +341,7 @@ struct dwarf2_per_bfd
/* A convenience function to allocate a signatured_type. The
returned object has its "index" field set properly. The object
is allocated on the dwarf2_per_bfd obstack. */
std::unique_ptr<signatured_type> allocate_signatured_type ();
signatured_type_up allocate_signatured_type ();
private:
/* This function is mapped across the sections and remembers the