Remove symbol::aclass_index
authorTom Tromey <tom@tromey.com>
Sat, 16 Apr 2022 18:49:50 +0000 (12:49 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 20 Apr 2022 15:28:16 +0000 (09:28 -0600)
Symbols have an aclass_index method, but this isn't needed, because
the aclass index isn't useful outside of the symbol implementation.

gdb/symtab.h

index 0adedd9841a4cac35bfacb0ba6637446c7f262d5..433c36618e2da1acd863a64c14e20b8adab716fb 100644 (file)
@@ -1221,11 +1221,6 @@ struct symbol : public general_symbol_info, public allocate_on_obstack
   symbol (const symbol &) = default;
   symbol &operator= (const symbol &) = default;
 
-  unsigned int aclass_index () const
-  {
-    return m_aclass_index;
-  }
-
   void set_aclass_index (unsigned int aclass_index)
   {
     m_aclass_index = aclass_index;
@@ -1233,7 +1228,7 @@ struct symbol : public general_symbol_info, public allocate_on_obstack
 
   const symbol_impl &impl () const
   {
-    return symbol_impls[this->aclass_index ()];
+    return symbol_impls[this->m_aclass_index];
   }
 
   address_class aclass () const