summaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.h
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-12 22:59:39 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-07-12 22:59:39 +0000
commitd0ef83bc9e240044be0d68dac18dbcaadbaaa022 (patch)
tree9c0d57b2b524d0afdcd6fc4965550024ea6b8cd0 /gcc/cp/name-lookup.h
parenta2674ef5a2a232ebca4798d9c32d16099d7f182e (diff)
downloadgcc-d0ef83bc9e240044be0d68dac18dbcaadbaaa022.tar.gz
* name-lookup.h (cp_binding_level): Rename from cxx_scope.
Update all users. (struct cp_binding_level): Fix indentation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176218 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/name-lookup.h')
-rw-r--r--gcc/cp/name-lookup.h166
1 files changed, 83 insertions, 83 deletions
diff --git a/gcc/cp/name-lookup.h b/gcc/cp/name-lookup.h
index 5f266eb9fc6..5974dce3288 100644
--- a/gcc/cp/name-lookup.h
+++ b/gcc/cp/name-lookup.h
@@ -53,7 +53,7 @@ extern binding_entry binding_table_find (binding_table, tree);
typedef struct cxx_binding cxx_binding;
/* The datatype used to implement C++ scope. */
-typedef struct cp_binding_level cxx_scope;
+typedef struct cp_binding_level cp_binding_level;
/* Nonzero if this binding is for a local scope, as opposed to a class
or namespace scope. */
@@ -71,7 +71,7 @@ struct GTY(()) cxx_binding {
/* The type entity this name is bound to. */
tree type;
/* The scope at which this binding was made. */
- cxx_scope *scope;
+ cp_binding_level *scope;
unsigned value_is_inherited : 1;
unsigned is_local : 1;
};
@@ -185,83 +185,83 @@ DEF_VEC_ALLOC_O(cp_label_binding,gc);
is duplicated in the IDENTIFIER_GLOBAL_VALUEs of all identifiers. */
struct GTY(()) cp_binding_level {
- /* A chain of _DECL nodes for all variables, constants, functions,
- and typedef types. These are in the reverse of the order
- supplied. There may be OVERLOADs on this list, too, but they
- are wrapped in TREE_LISTs; the TREE_VALUE is the OVERLOAD. */
- tree names;
-
- /* A chain of NAMESPACE_DECL nodes. */
- tree namespaces;
-
- /* An array of static functions and variables (for namespaces only) */
- VEC(tree,gc) *static_decls;
-
- /* A list of USING_DECL nodes. */
- tree usings;
-
- /* A list of used namespaces. PURPOSE is the namespace,
- VALUE the common ancestor with this binding_level's namespace. */
- tree using_directives;
-
- /* For the binding level corresponding to a class, the entities
- declared in the class or its base classes. */
- VEC(cp_class_binding,gc) *class_shadowed;
-
- /* Similar to class_shadowed, but for IDENTIFIER_TYPE_VALUE, and
- is used for all binding levels. The TREE_PURPOSE is the name of
- the entity, the TREE_TYPE is the associated type. In addition
- the TREE_VALUE is the IDENTIFIER_TYPE_VALUE before we entered
- the class. */
- tree type_shadowed;
-
- /* Similar to class_shadowed, but for IDENTIFIER_LABEL_VALUE, and
- used for all binding levels. */
- VEC(cp_label_binding,gc) *shadowed_labels;
-
- /* For each level (except not the global one),
- a chain of BLOCK nodes for all the levels
- that were entered and exited one level down. */
- tree blocks;
-
- /* The entity (namespace, class, function) the scope of which this
- binding contour corresponds to. Otherwise NULL. */
- tree this_entity;
-
- /* The binding level which this one is contained in (inherits from). */
- struct cp_binding_level *level_chain;
-
- /* List of VAR_DECLS saved from a previous for statement.
- These would be dead in ISO-conforming code, but might
- be referenced in ARM-era code. */
- VEC(tree,gc) *dead_vars_from_for;
-
- /* STATEMENT_LIST for statements in this binding contour.
- Only used at present for SK_CLEANUP temporary bindings. */
- tree statement_list;
-
- /* Binding depth at which this level began. */
- int binding_depth;
-
- /* The kind of scope that this object represents. However, a
- SK_TEMPLATE_SPEC scope is represented with KIND set to
- SK_TEMPLATE_PARMS and EXPLICIT_SPEC_P set to true. */
- ENUM_BITFIELD (scope_kind) kind : 4;
-
- /* True if this scope is an SK_TEMPLATE_SPEC scope. This field is
- only valid if KIND == SK_TEMPLATE_PARMS. */
- BOOL_BITFIELD explicit_spec_p : 1;
-
- /* true means make a BLOCK for this level regardless of all else. */
- unsigned keep : 1;
-
- /* Nonzero if this level can safely have additional
- cleanup-needing variables added to it. */
- unsigned more_cleanups_ok : 1;
- unsigned have_cleanups : 1;
-
- /* 24 bits left to fill a 32-bit word. */
- };
+ /* A chain of _DECL nodes for all variables, constants, functions,
+ and typedef types. These are in the reverse of the order
+ supplied. There may be OVERLOADs on this list, too, but they
+ are wrapped in TREE_LISTs; the TREE_VALUE is the OVERLOAD. */
+ tree names;
+
+ /* A chain of NAMESPACE_DECL nodes. */
+ tree namespaces;
+
+ /* An array of static functions and variables (for namespaces only) */
+ VEC(tree,gc) *static_decls;
+
+ /* A list of USING_DECL nodes. */
+ tree usings;
+
+ /* A list of used namespaces. PURPOSE is the namespace,
+ VALUE the common ancestor with this binding_level's namespace. */
+ tree using_directives;
+
+ /* For the binding level corresponding to a class, the entities
+ declared in the class or its base classes. */
+ VEC(cp_class_binding,gc) *class_shadowed;
+
+ /* Similar to class_shadowed, but for IDENTIFIER_TYPE_VALUE, and
+ is used for all binding levels. The TREE_PURPOSE is the name of
+ the entity, the TREE_TYPE is the associated type. In addition
+ the TREE_VALUE is the IDENTIFIER_TYPE_VALUE before we entered
+ the class. */
+ tree type_shadowed;
+
+ /* Similar to class_shadowed, but for IDENTIFIER_LABEL_VALUE, and
+ used for all binding levels. */
+ VEC(cp_label_binding,gc) *shadowed_labels;
+
+ /* For each level (except not the global one),
+ a chain of BLOCK nodes for all the levels
+ that were entered and exited one level down. */
+ tree blocks;
+
+ /* The entity (namespace, class, function) the scope of which this
+ binding contour corresponds to. Otherwise NULL. */
+ tree this_entity;
+
+ /* The binding level which this one is contained in (inherits from). */
+ cp_binding_level *level_chain;
+
+ /* List of VAR_DECLS saved from a previous for statement.
+ These would be dead in ISO-conforming code, but might
+ be referenced in ARM-era code. */
+ VEC(tree,gc) *dead_vars_from_for;
+
+ /* STATEMENT_LIST for statements in this binding contour.
+ Only used at present for SK_CLEANUP temporary bindings. */
+ tree statement_list;
+
+ /* Binding depth at which this level began. */
+ int binding_depth;
+
+ /* The kind of scope that this object represents. However, a
+ SK_TEMPLATE_SPEC scope is represented with KIND set to
+ SK_TEMPLATE_PARMS and EXPLICIT_SPEC_P set to true. */
+ ENUM_BITFIELD (scope_kind) kind : 4;
+
+ /* True if this scope is an SK_TEMPLATE_SPEC scope. This field is
+ only valid if KIND == SK_TEMPLATE_PARMS. */
+ BOOL_BITFIELD explicit_spec_p : 1;
+
+ /* true means make a BLOCK for this level regardless of all else. */
+ unsigned keep : 1;
+
+ /* Nonzero if this level can safely have additional
+ cleanup-needing variables added to it. */
+ unsigned more_cleanups_ok : 1;
+ unsigned have_cleanups : 1;
+
+ /* 24 bits left to fill a 32-bit word. */
+};
/* The binding level currently in effect. */
@@ -287,14 +287,14 @@ extern GTY(()) tree global_type_node;
#define global_scope_p(SCOPE) \
((SCOPE) == NAMESPACE_LEVEL (global_namespace))
-extern cxx_scope *leave_scope (void);
+extern cp_binding_level *leave_scope (void);
extern bool kept_level_p (void);
extern bool global_bindings_p (void);
extern bool toplevel_bindings_p (void);
extern bool namespace_bindings_p (void);
extern bool template_parm_scope_p (void);
extern scope_kind innermost_scope_kind (void);
-extern cxx_scope *begin_scope (scope_kind, tree);
+extern cp_binding_level *begin_scope (scope_kind, tree);
extern void print_binding_stack (void);
extern void push_to_top_level (void);
extern void pop_from_top_level (void);
@@ -305,7 +305,7 @@ extern tree push_scope (tree);
extern void pop_scope (tree);
extern tree push_inner_scope (tree);
extern void pop_inner_scope (tree, tree);
-extern void push_binding_level (struct cp_binding_level *);
+extern void push_binding_level (cp_binding_level *);
extern void push_namespace (tree);
extern void pop_namespace (void);
@@ -314,7 +314,7 @@ extern void pop_nested_namespace (tree);
extern bool handle_namespace_attrs (tree, tree);
extern void pushlevel_class (void);
extern void poplevel_class (void);
-extern tree pushdecl_with_scope (tree, cxx_scope *, bool);
+extern tree pushdecl_with_scope (tree, cp_binding_level *, bool);
extern tree lookup_name_prefer_type (tree, int);
extern tree lookup_name_real (tree, int, int, bool, int, int);
extern tree lookup_type_scope (tree, tag_scope);