From b4ca4f9e328cbce0f3aa9b13931900b2e5bd752e Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Wed, 13 Oct 2010 08:15:47 +0000 Subject: [PATCH] tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and clear DECL_CHAIN of NAMESPACE_DECLs. 2010-10-12 Richard Guenther * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and clear DECL_CHAIN of NAMESPACE_DECLs. From-SVN: r165413 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/tree.c | 9 +++++++++ 2 files changed, 14 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5b08906..9ac7a4a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2010-10-13 Richard Guenther + + * tree.c (cp_free_lang_data): Free DECL_NAMESPACE_USERS and + clear DECL_CHAIN of NAMESPACE_DECLs. + 2010-10-11 Martin Jambor PR c++/45562 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. -- 2.7.4