[201/203] Change exp_uses_objfile to return bool

Message ID 20210101214723.1784144-202-tom@tromey.com
State Superseded
Headers show
Series
  • Refactor expressions
Related show

Commit Message

Tom Tromey Jan. 1, 2021, 9:47 p.m.
This change exp_uses_objfile to return bool.

gdb/ChangeLog
2021-01-01  Tom Tromey  <tom@tromey.com>

	* parser-defs.h (exp_uses_objfile): Return bool.
	* parse.c (exp_uses_objfile): Return bool.
---
 gdb/ChangeLog     | 5 +++++
 gdb/parse.c       | 8 ++++----
 gdb/parser-defs.h | 2 +-
 3 files changed, 10 insertions(+), 5 deletions(-)

-- 
2.26.2

Patch

diff --git a/gdb/parse.c b/gdb/parse.c
index 8cdaa83b60b..3b7680e3127 100644
--- a/gdb/parse.c
+++ b/gdb/parse.c
@@ -630,11 +630,11 @@  parser_fprintf (FILE *x, const char *y, ...)
   va_end (args);
 }
 
-/* Return 1 if EXP uses OBJFILE (and will become dangling when OBJFILE
-   is unloaded), otherwise return 0.  OBJFILE must not be a separate debug info
-   file.  */
+/* Return rue if EXP uses OBJFILE (and will become dangling when
+   OBJFILE is unloaded), otherwise return false.  OBJFILE must not be
+   a separate debug info file.  */
 
-int
+bool
 exp_uses_objfile (struct expression *exp, struct objfile *objfile)
 {
   gdb_assert (objfile->separate_debug_objfile_backlink == NULL);
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 31be5e80bd9..401ed378524 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -376,7 +376,7 @@  extern bool parse_float (const char *p, int len,
 
 extern void parser_fprintf (FILE *, const char *, ...) ATTRIBUTE_PRINTF (2, 3);
 
-extern int exp_uses_objfile (struct expression *exp, struct objfile *objfile);
+extern bool exp_uses_objfile (struct expression *exp, struct objfile *objfile);
 
 #endif /* PARSER_DEFS_H */