aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-09-09 21:41:38 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-09 21:41:38 +0000
commit96603b4c5a3d4d698c5a7f59b67910ed93ced182 (patch)
tree15ea4dfce4fc305fb556decff352c130246460ee /gcc/c-decl.c
parent31cf01446d16abdebb2b05bb8183ba487648900c (diff)
downloadgcc-96603b4c5a3d4d698c5a7f59b67910ed93ced182.zip
gcc-96603b4c5a3d4d698c5a7f59b67910ed93ced182.tar.gz
gcc-96603b4c5a3d4d698c5a7f59b67910ed93ced182.tar.bz2
ggc.h (lang_cleanup_tree): Remove.
* ggc.h (lang_cleanup_tree): Remove. * gcc-simple.c (ggc_free_tree): Don't call lang_cleanup_tree. * ggc-callbacks.c (lang_cleanup_tree): Remove. * c-decl.c (finish_struct): Use ggc_alloc to allocate TYPE_LANG_SPECIFIC when garbage collecting. (lang_cleanup_tree): Remove. From-SVN: r29242
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index f23cbc2..1acb160 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -5725,7 +5725,9 @@ finish_struct (t, fieldlist, attributes)
/* Use the same allocation policy here that make_node uses, to
ensure that this lives as long as the rest of the struct decl.
All decls in an inline function need to be saved. */
- if (allocation_temporary_p ())
+ if (ggc_p)
+ space = ggc_alloc (sizeof (struct lang_type) + len * sizeof (tree));
+ else if (allocation_temporary_p ())
space = savealloc (sizeof (struct lang_type) + len * sizeof (tree));
else
space = oballoc (sizeof (struct lang_type) + len * sizeof (tree));
@@ -7142,19 +7144,6 @@ lang_mark_tree (t)
ggc_mark_tree (i->error_locus);
ggc_mark_tree (i->limbo_value);
}
-}
-
-/* Free the language specific bits in T for GC. */
-void
-lang_cleanup_tree (t)
- tree t;
-{
- if (TREE_CODE_CLASS (TREE_CODE (t)) == 't'
- && TYPE_LANG_SPECIFIC (t) != NULL)
- {
-#if 0
- /* This is currently allocated with an obstack. This will change. */
- free (TYPE_LANG_SPECIFIC (t));
-#endif
- }
+ else if (TYPE_P (t) && TYPE_LANG_SPECIFIC (t))
+ ggc_mark (TYPE_LANG_SPECIFIC (t));
}