Split rank_one_type_parm_complex from rank_one_type
[deliverable/binutils-gdb.git] / gdb / symtab.h
index c2d8a69cf9f692273aeca0bf506d75b9b7b3d798..d354c95800dbaa77b8e9f5584f0d19a6f8158d23 100644 (file)
 #include <array>
 #include <vector>
 #include <string>
-#include "gdb_vecs.h"
+#include "common/gdb_vecs.h"
 #include "gdbtypes.h"
 #include "gdb_regex.h"
 #include "common/enum-flags.h"
 #include "common/function-view.h"
 #include "common/gdb_optional.h"
+#include "common/next-iterator.h"
 #include "completer.h"
 
 /* Opaque declarations.  */
@@ -493,10 +494,11 @@ extern void symbol_set_language (struct general_symbol_info *symbol,
 /* Set the linkage and natural names of a symbol, by demangling
    the linkage name.  */
 #define SYMBOL_SET_NAMES(symbol,linkage_name,len,copy_name,objfile)    \
-  symbol_set_names (&(symbol)->ginfo, linkage_name, len, copy_name, objfile)
+  symbol_set_names (&(symbol)->ginfo, linkage_name, len, copy_name, \
+                   (objfile)->per_bfd)
 extern void symbol_set_names (struct general_symbol_info *symbol,
                              const char *linkage_name, int len, int copy_name,
-                             struct objfile *objfile);
+                             struct objfile_per_bfd_storage *per_bfd);
 
 /* Now come lots of name accessor macros.  Short version as to when to
    use which: Use SYMBOL_NATURAL_NAME to refer to the name of the
@@ -684,6 +686,14 @@ struct minimal_symbol
      the `next' pointer for the demangled hash table.  */
 
   struct minimal_symbol *demangled_hash_next;
+
+/* True if this symbol is of some data type.  */
+
+  bool data_p () const;
+
+  /* True if MSYMBOL is of some text type.  */
+
+  bool text_p () const;
 };
 
 #define MSYMBOL_TARGET_FLAG_1(msymbol)  (msymbol)->target_flag_1
@@ -733,7 +743,8 @@ struct minimal_symbol
 #define MSYMBOL_SEARCH_NAME(symbol)                                     \
    (symbol_search_name (&(symbol)->mginfo))
 #define MSYMBOL_SET_NAMES(symbol,linkage_name,len,copy_name,objfile)   \
-  symbol_set_names (&(symbol)->mginfo, linkage_name, len, copy_name, objfile)
+  symbol_set_names (&(symbol)->mginfo, linkage_name, len, copy_name, \
+                   (objfile)->per_bfd)
 
 #include "minsyms.h"
 
@@ -1485,10 +1496,16 @@ struct compunit_symtab
 #define COMPUNIT_CALL_SITE_HTAB(cust) ((cust)->call_site_htab)
 #define COMPUNIT_MACRO_TABLE(cust) ((cust)->macro_table)
 
-/* Iterate over all file tables (struct symtab) within a compunit.  */
+/* A range adapter to allowing iterating over all the file tables
+   within a compunit.  */
 
-#define ALL_COMPUNIT_FILETABS(cu, s) \
-  for ((s) = (cu) -> filetabs; (s) != NULL; (s) = (s) -> next)
+struct compunit_filetabs : public next_adapter<struct symtab>
+{
+  compunit_filetabs (struct compunit_symtab *cu)
+    : next_adapter<struct symtab> (cu->filetabs)
+  {
+  }
+};
 
 /* Return the primary symtab of CUST.  */
 
This page took 0.024549 seconds and 4 git commands to generate.