Return std::string from ada_encode
authorTom Tromey <tromey@adacore.com>
Fri, 9 Oct 2020 14:27:30 +0000 (08:27 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 9 Oct 2020 14:27:30 +0000 (08:27 -0600)
commit5c4258f4c051a31d7209712ecd28830c55a92034
tree4ca01f20c3de6dae58e62c5a3b0c34f3d78a0e10
parentfa40fbe484954c560ab1c0ff4bc1b2eeb1511344
Return std::string from ada_encode

This changes ada_encode to return a std::string.  This simplifies it
somewhat, removes a use of GROW_VECT, and is also simpler for callers
to use.

gdb/ChangeLog
2020-10-09  Tom Tromey  <tromey@adacore.com>

* ada-lang.h (ada_encode): Return std::string.
* ada-lang.c (ada_encode_1): Return std::string.
(ada_encode): Likewise.
(type_from_tag, ada_lookup_name_info::ada_lookup_name_info):
Update.
* ada-exp.y (block_lookup, write_var_or_type): Update.
gdb/ChangeLog
gdb/ada-exp.y
gdb/ada-lang.c
gdb/ada-lang.h