Change linespec_result::location to be an event_location_up

This is a follow-up to another patch.  It changes
linespec_result::location to be an event_location_up.

gdb/ChangeLog
2017-04-12  Tom Tromey  <tom@tromey.com>

	* probe.c (parse_probes): Update.
	* location.h (delete_event_location): Don't declare.
	(event_location_deleter::operator()): Update.
	* location.c (event_location_deleter::operator()): Rename from
	delete_event_location.
	* linespec.h (linespec_result) <location>: Change type to
	event_location_up.
	* linespec.c (canonicalize_linespec, event_location_to_sals)
	(decode_objc): Update.
	(linespec_result): Don't call delete_event_location.
	* breakpoint.c (create_breakpoints_sal)
	(bkpt_probe_create_sals_from_location)
	(strace_marker_create_sals_from_location): Update.
This commit is contained in:
Tom Tromey 2017-04-10 15:53:22 -06:00
parent 16e802b9c0
commit 8e9e35b180
7 changed files with 34 additions and 25 deletions

View file

@ -114,18 +114,11 @@ extern char *
extern const char *
event_location_to_string (struct event_location *location);
/* Free an event location and any associated data. */
extern void delete_event_location (struct event_location *location);
/* A deleter for a struct event_location. */
struct event_location_deleter
{
void operator() (event_location *location) const
{
delete_event_location (location);
}
void operator() (event_location *location) const;
};
/* A unique pointer for event_location. */