public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] Use bool for dwarf2_has_info
@ 2022-12-23 21:11 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2022-12-23 21:11 UTC (permalink / raw)
  To: gdb-patches; +Cc: Tom Tromey

This changes dwarf2_has_info to return bool.
---
 gdb/dwarf2/public.h | 6 +++---
 gdb/dwarf2/read.c   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/gdb/dwarf2/public.h b/gdb/dwarf2/public.h
index a9d4682c856..44352720097 100644
--- a/gdb/dwarf2/public.h
+++ b/gdb/dwarf2/public.h
@@ -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
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index db67dfc5a33..7bd12c107e2 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -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);
 
-- 
2.38.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-23 21:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-23 21:11 [pushed] Use bool for dwarf2_has_info Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).