From 32e62cbcc11caedcc00b7551c153d8f1b25e075c Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 21 Dec 2022 14:35:01 -0700 Subject: [PATCH] Use bool for dwarf2_has_info 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.30.2