Use bool for dwarf2_has_info
authorTom Tromey <tom@tromey.com>
Wed, 21 Dec 2022 21:35:01 +0000 (14:35 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 23 Dec 2022 21:14:18 +0000 (14:14 -0700)
This changes dwarf2_has_info to return bool.

gdb/dwarf2/public.h
gdb/dwarf2/read.c

index a9d4682c856bcd78088f8e734dab74f5362cdb7f..44352720097e6062bbeb49adc974e0770ef22ff5 100644 (file)
@@ -20,9 +20,9 @@
 #ifndef DWARF2_PUBLIC_H
 #define DWARF2_PUBLIC_H
 
-extern int dwarf2_has_info (struct objfile *,
-                            const struct dwarf2_debug_sections *,
-                           bool = false);
+extern bool dwarf2_has_info (struct objfile *,
+                            const struct dwarf2_debug_sections *,
+                            bool = false);
 
 /* A DWARF names index variant.  */
 enum class dw_index_kind
index db67dfc5a33b402e35d8d1b6381bfb07980b5191..7bd12c107e2273600564ecdee5b2783a2c84a240 100644 (file)
@@ -1549,13 +1549,13 @@ dwarf2_per_objfile::set_symtab (const dwarf2_per_cu_data *per_cu,
    interposition is possible and so symbol values must follow copy
    relocation rules.  */
 
-int
+bool
 dwarf2_has_info (struct objfile *objfile,
                 const struct dwarf2_debug_sections *names,
                 bool can_copy)
 {
   if (objfile->flags & OBJF_READNEVER)
-    return 0;
+    return false;
 
   dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);