From cac85af2467c9bac326b397b150274d95d2916a5 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 23 Nov 2018 17:09:34 -0700 Subject: Remove ALL_OBJFILES_SAFE This removes the ALL_OBJFILES_SAFE macro, replacing the uses with ranged for loops. gdb/ChangeLog 2019-01-09 Tom Tromey * common/next-iterator.h (next_adapter): Add Iterator template parameter. * objfiles.h (ALL_OBJFILES_SAFE): Remove. (class all_objfiles_safe): New. * jit.c (jit_inferior_exit_hook): Use all_objfiles_safe. * objfiles.c (put_objfile_before): Update comment. (add_separate_debug_objfile): Likewise. (free_all_objfiles): Use all_objfiles_safe. (objfile_purge_solibs): Likewise. --- gdb/common/next-iterator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/common/next-iterator.h') diff --git a/gdb/common/next-iterator.h b/gdb/common/next-iterator.h index 588ebfd..b61b253 100644 --- a/gdb/common/next-iterator.h +++ b/gdb/common/next-iterator.h @@ -72,7 +72,7 @@ private: /* A range adapter that allows iterating over a linked list. */ -template +template> class next_adapter { public: @@ -82,7 +82,7 @@ public: { } - using iterator = next_iterator; + using iterator = Iterator; iterator begin () const { -- cgit v1.1