[3/5] Define symbol::value_block separately

Message ID 20230314-submit-pragma-import-export-v1-3-a235709f7e96@adacore.com
State New
Headers
Series Implement Ada Pragma Import and Pragma Export |

Commit Message

Tom Tromey March 14, 2023, 8:04 p.m. UTC
  This moves the definition of symbol::value_block outside of the class.
A subsequent patch will change this method to use SYMBOL_BLOCK_OPS,
and it seemed simplest to move this method out-of-line, and cleaner to
do this as a separate change.
---
 gdb/symtab.h | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
  

Patch

diff --git a/gdb/symtab.h b/gdb/symtab.h
index 005b64b5a08..0a42fd2380c 100644
--- a/gdb/symtab.h
+++ b/gdb/symtab.h
@@ -1346,10 +1346,7 @@  struct symbol : public general_symbol_info, public allocate_on_obstack
     m_value.common_block = common_block;
   }
 
-  const block *value_block () const
-  {
-    return m_value.block;
-  }
+  const block *value_block () const;
 
   void set_value_block (const block *block)
   {
@@ -1507,6 +1504,12 @@  struct block_symbol
 #define SYMBOL_REGISTER_OPS(symbol)	((symbol)->impl ().ops_register)
 #define SYMBOL_LOCATION_BATON(symbol)   (symbol)->aux_value
 
+inline const block *
+symbol::value_block () const
+{
+  return m_value.block;
+}
+
 extern int register_symbol_computed_impl (enum address_class,
 					  const struct symbol_computed_ops *);