public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Don't include block.h from expop.h
@ 2023-02-08 18:37 Tom Tromey
  0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-02-08 18:37 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0671cc8b19d5b96f448a0a487cf12fe772df08fb

commit 0671cc8b19d5b96f448a0a487cf12fe772df08fb
Author: Tom Tromey <tom@tromey.com>
Date:   Sat Jan 21 14:00:05 2023 -0700

    Don't include block.h from expop.h
    
    expop.h needs block.h for a single inline function.  However, I don't
    think most of the check_objfile functions need to be defined in the
    header (just the templates).  This patch moves the one offending
    function and removes the include.

Diff:
---
 gdb/expop.h    | 8 ++------
 gdb/expprint.c | 6 ++++++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/gdb/expop.h b/gdb/expop.h
index 9e6ab0dd244..bfe55e4f2fd 100644
--- a/gdb/expop.h
+++ b/gdb/expop.h
@@ -20,7 +20,6 @@
 #ifndef EXPOP_H
 #define EXPOP_H
 
-#include "block.h"
 #include "c-lang.h"
 #include "cp-abi.h"
 #include "expression.h"
@@ -229,11 +228,8 @@ check_objfile (struct symbol *sym, struct objfile *objfile)
   return check_objfile (sym->objfile (), objfile);
 }
 
-static inline bool
-check_objfile (const struct block *block, struct objfile *objfile)
-{
-  return check_objfile (block_objfile (block), objfile);
-}
+extern bool check_objfile (const struct block *block,
+			   struct objfile *objfile);
 
 static inline bool
 check_objfile (const block_symbol &sym, struct objfile *objfile)
diff --git a/gdb/expprint.c b/gdb/expprint.c
index b70645fac92..63004f7f106 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -75,6 +75,12 @@ debug_exp (struct expression *exp)
 namespace expr
 {
 
+bool
+check_objfile (const struct block *block, struct objfile *objfile)
+{
+  return check_objfile (block_objfile (block), objfile);
+}
+
 void
 dump_for_expression (struct ui_file *stream, int depth, enum exp_opcode op)
 {

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

only message in thread, other threads:[~2023-02-08 18:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 18:37 [binutils-gdb] Don't include block.h from expop.h 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).