Convert location_spec_to_string to a method

This converts location_spec_to_string to a method of location_spec,
simplifying the code using it, as it no longer has to use
std::unique_ptr::get().

Change-Id: I621bdad8ea084470a2724163f614578caf8f2dd5
This commit is contained in:
Pedro Alves
2022-05-27 16:44:02 +01:00
parent 7464aeaab4
commit 709438c75a
8 changed files with 27 additions and 49 deletions

View File

@@ -3149,7 +3149,7 @@ decode_line_full (struct location_spec *locspec, int flags,
if (result.size () == 0)
throw_error (NOT_SUPPORTED_ERROR, _("Location %s not available"),
location_spec_to_string (locspec));
locspec->to_string ());
gdb_assert (result.size () == 1 || canonical->pre_expanded);
canonical->pre_expanded = 1;