diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-06-15 16:42:46 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-06-15 16:42:46 +0000 |
commit | 878ee9e3001e08dd982987adb87d9d98f230e315 (patch) | |
tree | 65e6067fe38f2ccc0452eeb9a3e276c323d4f05a /gcc/cp/decl.c | |
parent | f6b98cfd35beb1584a3939b80fd7cb34e31462b5 (diff) | |
download | ppe42-gcc-878ee9e3001e08dd982987adb87d9d98f230e315.tar.gz ppe42-gcc-878ee9e3001e08dd982987adb87d9d98f230e315.zip |
* cp-tree.h (class_cache_firstobj): Declare.
(maybe_push_cache_obstack): Rename to push_cache_obstack.
* class.c (permanent_obstack): Remove declaration.
(class_cache_firstobj): Make it global.
(add_method): Don't use permanent_obstack directly.
(pushclass): Only free the class_cache_obstack if we know how far
back to free it.
(maybe_push_cache_obstack): Rename to push_cache_obstack.
* decl.c: Remove dead comment.
(saved_scope): Add class_cache_firstobj.
(push_to_top_level): Save it.
(pop_from_top_level): Restore it.
(push_class_level_binding): Use push_cache_obstack, not
maybe_push_cache_obstack.
* search.c (push_class_decls): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@27534 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index b941bb86743..1fc452551dc 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -63,8 +63,6 @@ extern tree global_namespace; extern void (*print_error_function) PROTO((char *)); extern int (*valid_lang_attribute) PROTO ((tree, tree, tree, tree)); -/* Stack of places to restore the search obstack back to. */ - /* Obstack used for remembering local class declarations (like enums and static (const) members. */ #include "stack.h" @@ -2466,6 +2464,7 @@ struct saved_scope { tree previous_class_type, previous_class_values; int processing_specialization; int processing_explicit_instantiation; + char *class_cache_firstobj; }; static struct saved_scope *current_saved_scope; @@ -2583,6 +2582,7 @@ maybe_push_to_top_level (pseudo) s->processing_template_decl = processing_template_decl; s->previous_class_type = previous_class_type; s->previous_class_values = previous_class_values; + s->class_cache_firstobj = class_cache_firstobj; s->processing_specialization = processing_specialization; s->processing_explicit_instantiation = processing_explicit_instantiation; @@ -2598,6 +2598,7 @@ maybe_push_to_top_level (pseudo) shadowed_labels = NULL_TREE; minimal_parse_mode = 0; previous_class_type = previous_class_values = NULL_TREE; + class_cache_firstobj = 0; processing_specialization = 0; processing_explicit_instantiation = 0; current_template_parms = NULL_TREE; @@ -2669,6 +2670,7 @@ pop_from_top_level () previous_class_values = s->previous_class_values; processing_specialization = s->processing_specialization; processing_explicit_instantiation = s->processing_explicit_instantiation; + class_cache_firstobj = s->class_cache_firstobj; free (s); @@ -4471,7 +4473,7 @@ push_class_level_binding (name, x) IDENTIFIER_CLASS_VALUE. */ if (push_class_binding (name, x)) { - maybe_push_cache_obstack (); + push_cache_obstack (); class_binding_level->class_shadowed = tree_cons (name, IDENTIFIER_CLASS_VALUE (name), class_binding_level->class_shadowed); |