From 3031802941cd7d20148b5992e7ca0ceca87ed2e9 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 5 May 2017 11:30:49 +0000 Subject: Kill per-namespace static_decls. * cp-tree.h (static_decls): Declare. (wrapup_globals_for_namespace) diagnose_inline_vars_for_namespace): Replace with ... (wrapup_namespace_globals): ... this. * decl.c (static_decls): Define. (wrapup_globals_for_namespace) diagnose_inline_vars_for_namespace): Replace with ... (wrapup_namespace_globals): ... this. (cxx_init_decl_processing): Initialize static_decls. * decl2.c (c_parse_final_cleanups): Adjust. * name-lookup.h (cp_binding_level): Remove static_decls member. * name-lookup.c (add_decl_to_level): Adjust. (begin_scope): Adjust. ((--This line, and those below, will be ignored-- M cp/cp-tree.h M cp/name-lookup.c M cp/name-lookup.h M cp/ChangeLog M cp/decl2.c M cp/decl.c From-SVN: r247633 --- gcc/cp/cp-tree.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gcc/cp/cp-tree.h') diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h index e27cc3c6..549c576 100644 --- a/gcc/cp/cp-tree.h +++ b/gcc/cp/cp-tree.h @@ -4908,6 +4908,12 @@ extern int current_class_depth; /* An array of all local classes present in this translation unit, in declaration order. */ extern GTY(()) vec *local_classes; + +/* in decl.c */ + +/* An array of static vars & fns. */ +extern GTY(()) vec *static_decls; + /* Here's where we control how name mangling takes place. */ @@ -5899,8 +5905,7 @@ extern tree check_default_argument (tree, tree, tsubst_flags_t); typedef int (*walk_namespaces_fn) (tree, void *); extern int walk_namespaces (walk_namespaces_fn, void *); -extern int wrapup_globals_for_namespace (tree, void *); -extern int diagnose_inline_vars_for_namespace (tree, void *); +extern int wrapup_namespace_globals (); extern tree create_implicit_typedef (tree, tree); extern int local_variable_p (const_tree); extern tree register_dtor_fn (tree); -- cgit v1.1