This converts location_spec_empty_p to a method of location_spec,
simplifying users, as they no longer have to use
std::unique_ptr::get().
Change-Id: I83381a729896f12e1c5a1b4d6d4c2eb1eb6582ff
static int
breakpoint_location_spec_empty_p (const struct breakpoint *b)
{
- return (b->locspec != nullptr
- && location_spec_empty_p (b->locspec.get ()));
+ return (b->locspec != nullptr && b->locspec->empty_p ());
}
void
/* If the user really specified a location spec, then we're
done. */
- if (!location_spec_empty_p (locspec.get ()))
+ if (!locspec->empty_p ())
return locspec;
/* Otherwise, the user _only_ specified optional flags like
/* See description in location.h. */
-int
-location_spec_empty_p (const location_spec *locspec)
-{
- return locspec->empty_p ();
-}
-
-/* See description in location.h. */
-
void
set_location_spec_string (struct location_spec *locspec,
std::string &&string)
const struct language_defn *language,
explicit_completion_info *completion_info);
-/* A convenience function for testing for unset location specs. */
-
-extern int location_spec_empty_p (const location_spec *locspec);
-
/* Set the location specs's string representation. */
extern void set_location_spec_string (struct location_spec *locspec,