+2020-06-30  Tom Tromey  <tromey@adacore.com>
+
+       PR build/26183:
+       * ada-lang.c (ada_lookup_name_info::ada_lookup_name_info): Use
+       gdb::to_string.
+
 2020-06-29  Simon Marchi  <simon.marchi@efficios.com>
 
        * gdbarch.sh (displaced_step_copy_insn): Update doc.
 
     {
       if (user_name.back () == '>')
        m_encoded_name
-         = user_name.substr (1, user_name.size () - 2).to_string ();
+         = gdb::to_string (user_name.substr (1, user_name.size () - 2));
       else
        m_encoded_name
-         = user_name.substr (1, user_name.size () - 1).to_string ();
+         = gdb::to_string (user_name.substr (1, user_name.size () - 1));
       m_encoded_p = true;
       m_verbatim_p = true;
       m_wild_match_p = false;
          if (encoded != NULL)
            m_encoded_name = encoded;
          else
-           m_encoded_name = user_name.to_string ();
+           m_encoded_name = gdb::to_string (user_name);
        }
       else
-       m_encoded_name = user_name.to_string ();
+       m_encoded_name = gdb::to_string (user_name);
 
       /* Handle the 'package Standard' special case.  See description
         of m_standard_p.  */
 
+2020-06-30  Tom Tromey  <tromey@adacore.com>
+
+       PR build/26183:
+       * gdb_string_view.h (basic_string_view::to_string): Remove.
+       (gdb::to_string): New function.
+
 2020-06-27  Simon Marchi  <simon.marchi@efficios.com>
 
        * tdesc.h (class print_xml_feature) <add_line>: Add
 
          return { this->_M_str, this->_M_len };
        }
 
-      template<typename _Allocator = std::allocator<_CharT>>
-       std::basic_string<_CharT, _Traits, _Allocator>
-       to_string(const _Allocator& __alloc = _Allocator()) const
-       {
-         return { this->_M_str, this->_M_len, __alloc };
-       }
-
       size_type
       copy(_CharT* __str, size_type __n, size_type __pos = 0) const
       {
 
 #endif // __cplusplus < 201703L
 
+namespace gdb {
+
+static inline std::string
+to_string(const gdb::string_view &view)
+{
+  return { view.data (), view.size () };
+}
+
+}
+
 #endif /* COMMON_GDB_STRING_VIEW_H */