]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Move symbol::value_block to symtab.c
authorTom Tromey <tom@tromey.com>
Wed, 22 Oct 2025 21:23:03 +0000 (15:23 -0600)
committerTom Tromey <tom@tromey.com>
Thu, 6 Nov 2025 21:54:43 +0000 (14:54 -0700)
It seems to me that symbol::value_block doesn't particularly need to
be inlined.  This patch moves it to symtab.c.

gdb/symtab.c
gdb/symtab.h

index 3195cd2e2ae9283b368e2b076a64a8b656b016a5..7117e0d7feae70ec38ac3f8b3f653fc41c5fe899 100644 (file)
@@ -6586,6 +6586,18 @@ symbol::get_maybe_copied_address () const
 
 /* See symtab.h.  */
 
+const block *
+symbol::value_block () const
+{
+  if (const symbol_block_ops *block_ops = this->block_ops ();
+      block_ops != nullptr && block_ops->get_block_value != nullptr)
+    return block_ops->get_block_value (this);
+
+  return m_value.block;
+}
+
+/* See symtab.h.  */
+
 CORE_ADDR
 minimal_symbol::get_maybe_copied_address (objfile *objf) const
 {
index 486b99d123ae13af426d338b58ce7d6e509a2e81..9c7fe0fbf1abf93d26a70dd53c1e5b429c3a8697 100644 (file)
@@ -1565,16 +1565,6 @@ struct block_symbol
 
 #define SYMBOL_LOCATION_BATON(symbol)   (symbol)->aux_value
 
-inline const block *
-symbol::value_block () const
-{
-  if (const symbol_block_ops *block_ops = this->block_ops ();
-      block_ops != nullptr && block_ops->get_block_value != nullptr)
-    return block_ops->get_block_value (this);
-
-  return m_value.block;
-}
-
 extern int register_symbol_computed_impl (location_class,
                                          const struct symbol_computed_ops *);