Commit 5a167978 by Gabriel Dos Reis Committed by Gabriel Dos Reis

name-lookup.h (cxx_scope_find_binding_for_name): Don't export.

	* name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
	(binding_for_name): Likewise.
	(cxx_binding_clear): Move to name-lookup.c.
	* name-lookup.c (cxx_scope_find_binding_for_name): Now static.
	(binding_for_name): Likewise.
	* decl2.c (is_ancestor): Move to name-lookup.c
	(namespace_ancestor): Likewise.
	(add_using_namespace): Likewise.
	(ambiguous_decl): Likewise.
	(lookup_using_namespace): Likewise.
	(qualified_lookup_using_namespace): Likewise.
	(set_decl_namespace): Likewise.
	(decl_namespace): Likewise.
	(current_decl_namespace): Likewise.
	(push_decl_namespace): Likewise.
	(pop_decl_namespace): Likewise.
	(push_scope): Likewise.
	(pop_scope): Likewise.
	(struct arg_lookup): Likewise.
	(arg_assoc): Likewise.
	(arg_assoc_args): Likewise.
	(arg_assoc_type): Likewise.
	(add_function): Likewise.
	(arg_assoc_namespace): Likewise.
	(arg_assoc_class): Likewise.
	(arg_assoc_template_arg): Likewise.
	(do_namespace_alias): Likewise.
	(validate_nonmember_using_decl): Likewise.
	(do_nonmember_using_decl): Likewise.
	(do_toplevel_using_decl): Likewise.
	(do_local_using_decl): Likewise.
	(do_class_using_decl): Likewise.
	(do_using_directive): Likewise.
	(constructor_name_full): Likewise.
	(constructor_name): Likewise.
	(constructor_name_p): Likewise.

From-SVN: r72462
parent 9dccaa6b
...@@ -4,6 +4,45 @@ ...@@ -4,6 +4,45 @@
2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net> 2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
* name-lookup.h (cxx_scope_find_binding_for_name): Don't export.
(binding_for_name): Likewise.
(cxx_binding_clear): Move to name-lookup.c.
* name-lookup.c (cxx_scope_find_binding_for_name): Now static.
(binding_for_name): Likewise.
* decl2.c (is_ancestor): Move to name-lookup.c
(namespace_ancestor): Likewise.
(add_using_namespace): Likewise.
(ambiguous_decl): Likewise.
(lookup_using_namespace): Likewise.
(qualified_lookup_using_namespace): Likewise.
(set_decl_namespace): Likewise.
(decl_namespace): Likewise.
(current_decl_namespace): Likewise.
(push_decl_namespace): Likewise.
(pop_decl_namespace): Likewise.
(push_scope): Likewise.
(pop_scope): Likewise.
(struct arg_lookup): Likewise.
(arg_assoc): Likewise.
(arg_assoc_args): Likewise.
(arg_assoc_type): Likewise.
(add_function): Likewise.
(arg_assoc_namespace): Likewise.
(arg_assoc_class): Likewise.
(arg_assoc_template_arg): Likewise.
(do_namespace_alias): Likewise.
(validate_nonmember_using_decl): Likewise.
(do_nonmember_using_decl): Likewise.
(do_toplevel_using_decl): Likewise.
(do_local_using_decl): Likewise.
(do_class_using_decl): Likewise.
(do_using_directive): Likewise.
(constructor_name_full): Likewise.
(constructor_name): Likewise.
(constructor_name_p): Likewise.
2003-10-13 Gabriel Dos Reis <gdr@integrable-solutions.net>
Break out decl.c (2/n) Break out decl.c (2/n)
* name-lookup.c: Include diagnostic.h * name-lookup.c: Include diagnostic.h
(cxx_binding_free): Make static. (cxx_binding_free): Make static.
......
...@@ -3615,11 +3615,7 @@ extern void check_goto (tree); ...@@ -3615,11 +3615,7 @@ extern void check_goto (tree);
extern void define_case_label (void); extern void define_case_label (void);
extern tree make_typename_type (tree, tree, tsubst_flags_t); extern tree make_typename_type (tree, tree, tsubst_flags_t);
extern tree make_unbound_class_template (tree, tree, tsubst_flags_t); extern tree make_unbound_class_template (tree, tree, tsubst_flags_t);
extern tree namespace_ancestor (tree, tree);
extern bool is_ancestor (tree, tree);
extern tree check_for_out_of_scope_variable (tree); extern tree check_for_out_of_scope_variable (tree);
extern bool lookup_using_namespace (tree, cxx_binding *, tree, tree, int, tree *);
extern bool qualified_lookup_using_namespace (tree, tree, cxx_binding *, int);
extern tree build_library_fn (tree, tree); extern tree build_library_fn (tree, tree);
extern tree build_library_fn_ptr (const char *, tree); extern tree build_library_fn_ptr (const char *, tree);
extern tree build_cp_library_fn_ptr (const char *, tree); extern tree build_cp_library_fn_ptr (const char *, tree);
...@@ -3709,9 +3705,6 @@ extern tree grokfield (tree, tree, tree, tree, tree); ...@@ -3709,9 +3705,6 @@ extern tree grokfield (tree, tree, tree, tree, tree);
extern tree grokbitfield (tree, tree, tree); extern tree grokbitfield (tree, tree, tree);
extern tree groktypefield (tree, tree); extern tree groktypefield (tree, tree);
extern void cplus_decl_attributes (tree *, tree, int); extern void cplus_decl_attributes (tree *, tree, int);
extern tree constructor_name_full (tree);
extern tree constructor_name (tree);
extern bool constructor_name_p (tree, tree);
extern void defer_fn (tree); extern void defer_fn (tree);
extern void finish_anon_union (tree); extern void finish_anon_union (tree);
extern tree finish_table (tree, tree, tree, int); extern tree finish_table (tree, tree, tree, int);
...@@ -3723,20 +3716,8 @@ extern void import_export_decl (tree); ...@@ -3723,20 +3716,8 @@ extern void import_export_decl (tree);
extern void import_export_tinfo (tree, tree, bool); extern void import_export_tinfo (tree, tree, bool);
extern tree build_cleanup (tree); extern tree build_cleanup (tree);
extern tree build_offset_ref_call_from_tree (tree, tree); extern tree build_offset_ref_call_from_tree (tree, tree);
extern void set_decl_namespace (tree, tree, bool);
extern tree current_decl_namespace (void);
extern void push_decl_namespace (tree);
extern void pop_decl_namespace (void);
extern void push_scope (tree);
extern void pop_scope (tree);
extern void do_namespace_alias (tree, tree);
extern void do_toplevel_using_decl (tree);
extern void do_local_using_decl (tree);
extern tree do_class_using_decl (tree);
extern void do_using_directive (tree);
extern void check_default_args (tree); extern void check_default_args (tree);
extern void mark_used (tree); extern void mark_used (tree);
extern tree lookup_arg_dependent (tree, tree, tree);
extern void finish_static_data_member_decl (tree, tree, tree, int); extern void finish_static_data_member_decl (tree, tree, tree, int);
extern tree cp_build_parm_decl (tree, tree); extern tree cp_build_parm_decl (tree, tree);
extern tree build_artificial_parm (tree, tree); extern tree build_artificial_parm (tree, tree);
......
...@@ -70,9 +70,6 @@ typedef struct cp_binding_level cxx_scope; ...@@ -70,9 +70,6 @@ typedef struct cp_binding_level cxx_scope;
currently being defined. */ currently being defined. */
#define INHERITED_VALUE_BINDING_P(NODE) ((NODE)->value_is_inherited) #define INHERITED_VALUE_BINDING_P(NODE) ((NODE)->value_is_inherited)
/* Zero out a cxx_binding pointed to by B. */
#define cxx_binding_clear(B) memset ((B), 0, sizeof (cxx_binding))
struct cxx_binding GTY(()) struct cxx_binding GTY(())
{ {
/* Link to chain together various bindings for this name. */ /* Link to chain together various bindings for this name. */
...@@ -91,6 +88,9 @@ extern tree identifier_type_value (tree); ...@@ -91,6 +88,9 @@ extern tree identifier_type_value (tree);
extern void set_identifier_type_value (tree, tree); extern void set_identifier_type_value (tree, tree);
extern void pop_binding (tree, tree); extern void pop_binding (tree, tree);
extern void clear_identifier_class_values (void); extern void clear_identifier_class_values (void);
extern tree constructor_name_full (tree);
extern tree constructor_name (tree);
extern bool constructor_name_p (tree, tree);
/* The kinds of scopes we recognize. */ /* The kinds of scopes we recognize. */
typedef enum scope_kind { typedef enum scope_kind {
...@@ -267,16 +267,18 @@ extern void pop_from_top_level (void); ...@@ -267,16 +267,18 @@ extern void pop_from_top_level (void);
extern void maybe_push_to_top_level (int); extern void maybe_push_to_top_level (int);
extern void pop_everything (void); extern void pop_everything (void);
extern void keep_next_level (bool); extern void keep_next_level (bool);
extern bool is_ancestor (tree, tree);
extern void push_scope (tree);
extern void pop_scope (tree);
extern void push_namespace (tree); extern void push_namespace (tree);
extern void pop_namespace (void); extern void pop_namespace (void);
extern void push_nested_namespace (tree); extern void push_nested_namespace (tree);
extern void pop_nested_namespace (tree); extern void pop_nested_namespace (tree);
extern tree namespace_ancestor (tree, tree);
extern tree push_using_directive (tree); extern tree push_using_directive (tree);
extern void pushlevel_class (void); extern void pushlevel_class (void);
extern void poplevel_class (void); extern void poplevel_class (void);
extern cxx_binding *cxx_scope_find_binding_for_name (cxx_scope *, tree);
extern cxx_binding *binding_for_name (cxx_scope *, tree);
extern tree pushdecl_with_scope (tree, cxx_scope *); extern tree pushdecl_with_scope (tree, cxx_scope *);
extern tree lookup_tag (enum tree_code, tree, cxx_scope *, int); extern tree lookup_tag (enum tree_code, tree, cxx_scope *, int);
extern tree lookup_tag_reverse (tree, tree); extern tree lookup_tag_reverse (tree, tree);
...@@ -284,6 +286,8 @@ extern tree lookup_name (tree, int); ...@@ -284,6 +286,8 @@ extern tree lookup_name (tree, int);
extern tree lookup_name_real (tree, int, int, int, int); extern tree lookup_name_real (tree, int, int, int, int);
extern tree lookup_name_current_level (tree); extern tree lookup_name_current_level (tree);
extern tree lookup_type_current_level (tree); extern tree lookup_type_current_level (tree);
extern bool lookup_using_namespace (tree, cxx_binding *, tree, tree, int, tree *);
extern bool qualified_lookup_using_namespace (tree, tree, cxx_binding *, int);
extern tree namespace_binding (tree, tree); extern tree namespace_binding (tree, tree);
extern void add_decl_to_level (tree, cxx_scope *); extern void add_decl_to_level (tree, cxx_scope *);
extern void set_namespace_binding (tree, tree, tree); extern void set_namespace_binding (tree, tree, tree);
...@@ -301,6 +305,16 @@ extern void storetags (tree); ...@@ -301,6 +305,16 @@ extern void storetags (tree);
extern tree getdecls (void); extern tree getdecls (void);
extern tree cp_namespace_decls (tree); extern tree cp_namespace_decls (tree);
extern void set_class_shadows (tree); extern void set_class_shadows (tree);
extern void set_decl_namespace (tree, tree, bool);
extern tree current_decl_namespace (void);
extern void push_decl_namespace (tree);
extern void pop_decl_namespace (void);
extern void do_namespace_alias (tree, tree);
extern void do_toplevel_using_decl (tree);
extern void do_local_using_decl (tree);
extern tree do_class_using_decl (tree);
extern void do_using_directive (tree);
extern tree lookup_arg_dependent (tree, tree, tree);
/* Set *DECL to the (non-hidden) declaration for ID at global scope, /* Set *DECL to the (non-hidden) declaration for ID at global scope,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment