Change all_objfiles_safe adapter to be a method on program_space
[deliverable/binutils-gdb.git] / gdb / objfiles.h
index cde025d9d91e451eebc61ccc31a1259e6ca18a39..599d8a1bce9cb682d3baa8547433660d64ad0b04 100644 (file)
@@ -298,7 +298,7 @@ struct objfile
   void reset_psymtabs ()
   {
     psymbol_map.clear ();
-    partial_symtabs.reset (new psymtab_storage (this));
+    partial_symtabs.reset (new psymtab_storage ());
   }
 
 
@@ -416,7 +416,7 @@ struct objfile
      Although this is a tree structure, GDB only support one level
      (ie a separate debug for a separate debug is not supported).  Note that
      separate debug object are in the main chain and therefore will be
-     visited by all_objfiles & co iterators.  Separate debug objfile always
+     visited by objfiles & co iterators.  Separate debug objfile always
      has a non-nul separate_debug_objfile_backlink.  */
 
   /* Link to the first separate debug object, if any.  */
@@ -553,43 +553,6 @@ extern void default_iterate_over_objfiles_in_search_order
    void *cb_data, struct objfile *current_objfile);
 \f
 
-/* An iterarable object that can be used to iterate over all
-   objfiles.  The basic use is in a foreach, like:
-
-   for (objfile *objf : all_objfiles (pspace)) { ... }  */
-
-class all_objfiles : public next_adapter<struct objfile>
-{
-public:
-
-  explicit all_objfiles (struct program_space *pspace)
-    : next_adapter<struct objfile> (pspace->objfiles)
-  {
-  }
-};
-
-/* An iterarable object that can be used to iterate over all
-   objfiles.  The basic use is in a foreach, like:
-
-   for (objfile *objf : all_objfiles_safe (pspace)) { ... }
-
-   This variant uses a basic_safe_iterator so that objfiles can be
-   deleted during iteration.  */
-
-class all_objfiles_safe
-  : public next_adapter<struct objfile,
-                       basic_safe_iterator<next_iterator<objfile>>>
-{
-public:
-
-  explicit all_objfiles_safe (struct program_space *pspace)
-    : next_adapter<struct objfile,
-                  basic_safe_iterator<next_iterator<objfile>>>
-        (pspace->objfiles)
-  {
-  }
-};
-
 /* A range adapter that makes it possible to iterate over all
    compunits in one objfile.  */
 
This page took 0.026811 seconds and 4 git commands to generate.