+2021-05-31  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * dwarf2/read.h (signatured_type_up): New, use where possible.
+
 2021-05-31  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * dwarf2/read.h (signatured_type, dwarf2_per_cu_data): Move up.
 
 
 /* See read.h.  */
 
-std::unique_ptr<signatured_type>
+signatured_type_up
 dwarf2_per_bfd::allocate_signatured_type ()
 {
-  std::unique_ptr<signatured_type> result (new signatured_type);
+  signatured_type_up result (new signatured_type);
   result->per_bfd = this;
   result->index = all_comp_units.size ();
   result->is_debug_types = true;
 
   for (offset_type i = 0; i < elements; i += 3)
     {
-      std::unique_ptr<signatured_type> sig_type;
+      signatured_type_up sig_type;
       ULONGEST signature;
       void **slot;
       cu_offset type_offset_in_tu;
 
   for (uint32_t i = 0; i < map.tu_count; ++i)
     {
-      std::unique_ptr<signatured_type> sig_type;
+      signatured_type_up sig_type;
       void **slot;
 
       sect_offset sect_off
   end_ptr = info_ptr + section->size;
   while (info_ptr < end_ptr)
     {
-      std::unique_ptr<signatured_type> sig_type;
+      signatured_type_up sig_type;
       struct dwo_unit *dwo_tu;
       void **slot;
       const gdb_byte *ptr = info_ptr;
       == per_objfile->per_bfd->all_comp_units.capacity ())
     ++per_objfile->per_bfd->tu_stats.nr_all_type_units_reallocs;
 
-  std::unique_ptr<signatured_type> sig_type_holder
+  signatured_type_up sig_type_holder
     = per_objfile->per_bfd->allocate_signatured_type ();
   signatured_type *sig_type = sig_type_holder.get ();
 
 
   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.
 
   /* 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