aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2010-10-13 08:15:47 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2010-10-13 08:15:47 +0000
commitb4ca4f9e328cbce0f3aa9b13931900b2e5bd752e (patch)
tree09f005ca5da4d928968c8540d7f14ecca089fd80 /gcc/cp/tree.c
parentd59dc888de1f2d4ffba7b4666ef383a4d84bf50b (diff)
downloadgcc-b4ca4f9e328cbce0f3aa9b13931900b2e5bd752e.zip
gcc-b4ca4f9e328cbce0f3aa9b13931900b2e5bd752e.tar.gz
gcc-b4ca4f9e328cbce0f3aa9b13931900b2e5bd752e.tar.bz2
tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and clear DECL_CHAIN of NAMESPACE_DECLs.
2010-10-12 Richard Guenther <rguenther@suse.de> * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and clear DECL_CHAIN of NAMESPACE_DECLs. From-SVN: r165413
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index 174500e..93d13a1 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -3265,6 +3265,15 @@ cp_free_lang_data (tree t)
&& ANON_AGGRNAME_P (name))
TYPE_NAME (t) = NULL_TREE;
}
+ if (TREE_CODE (t) == NAMESPACE_DECL)
+ {
+ /* The list of users of a namespace isn't useful for the middle-end
+ or debug generators. */
+ DECL_NAMESPACE_USERS (t) = NULL_TREE;
+ /* Neither do we need the leftover chaining of namespaces
+ from the binding level. */
+ DECL_CHAIN (t) = NULL_TREE;
+ }
}
/* Stub for c-common. Please keep in sync with c-decl.c.