btrace: Replace struct btrace_function::segment.
[deliverable/binutils-gdb.git] / gdb / completer.c
index 7e46416b1c7eef243a5b894be46e9befcae63074..6acf115164fcf1c40756c9cd23364745a5e304aa 100644 (file)
@@ -507,17 +507,13 @@ location_completer (struct cmd_list_element *ignore,
 {
   VEC (char_ptr) *matches = NULL;
   const char *copy = text;
-  struct event_location *location;
 
-  location = string_to_explicit_location (&copy, current_language, 1);
+  event_location_up location = string_to_explicit_location (&copy,
+                                                           current_language,
+                                                           1);
   if (location != NULL)
-    {
-      struct cleanup *cleanup;
-
-      cleanup = make_cleanup_delete_event_location (location);
-      matches = explicit_location_completer (ignore, location, text, word);
-      do_cleanups (cleanup);
-    }
+    matches = explicit_location_completer (ignore, location.get (),
+                                          text, word);
   else
     {
       /* This is an address or linespec location.
This page took 0.024316 seconds and 4 git commands to generate.