]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use bool in map_matching_symbols
authorTom Tromey <tromey@adacore.com>
Wed, 15 Apr 2026 14:02:17 +0000 (08:02 -0600)
committerTom Tromey <tromey@adacore.com>
Fri, 8 May 2026 13:53:23 +0000 (07:53 -0600)
This changes ada-lang.c:map_matching_symbols to take a bool parameter,
then fixes up the callers.

Approved-By: Andrew Burgess <aburgess@redhat.com>
gdb/ada-lang.c

index 94907072339e9f45fd3c67bb38d203f47759d6db..0600394361ca8db5b59f34587214e4c05904f564 100644 (file)
@@ -5527,7 +5527,7 @@ static void
 map_matching_symbols (struct objfile *objfile,
                      const lookup_name_info &lookup_name,
                      domain_search_flags domain,
-                     int global,
+                     bool global,
                      match_data &data)
 {
   data.objfile = objfile;
@@ -5548,13 +5548,13 @@ map_matching_symbols (struct objfile *objfile,
 
 /* Add to RESULT all non-local symbols whose name and domain match
    LOOKUP_NAME and DOMAIN respectively.  The search is performed on
-   GLOBAL_BLOCK symbols if GLOBAL is non-zero, or on STATIC_BLOCK
+   GLOBAL_BLOCK symbols if GLOBAL is true, or on STATIC_BLOCK
    symbols otherwise.  */
 
 static void
 add_nonlocal_symbols (std::vector<struct block_symbol> &result,
                      const lookup_name_info &lookup_name,
-                     domain_search_flags domain, int global)
+                     domain_search_flags domain, bool global)
 {
   struct match_data data (&result);
 
@@ -5657,13 +5657,13 @@ ada_add_all_symbols (std::vector<struct block_symbol> &result,
 
   /* Search symbols from all global blocks.  */
 
-  add_nonlocal_symbols (result, lookup_name, domain, 1);
+  add_nonlocal_symbols (result, lookup_name, domain, true);
 
   /* Now add symbols from all per-file blocks if we've gotten no hits
      (not strictly correct, but perhaps better than an error).  */
 
   if (result.empty ())
-    add_nonlocal_symbols (result, lookup_name, domain, 0);
+    add_nonlocal_symbols (result, lookup_name, domain, false);
 }
 
 /* Find symbols in DOMAIN matching LOOKUP_NAME, in BLOCK and, if FULL_SEARCH