aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lex.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@acm.org>2017-05-30 19:12:35 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2017-05-30 19:12:35 +0000
commit98c28dd4ba5bc2fe9141f44aeed7d59a07012018 (patch)
treee0e4292c8b996890aeb6b35593dfc720d1fa9446 /gcc/cp/lex.c
parent5256a7f5961e6a5137be1d340cb380b62b06e19f (diff)
downloadgcc-98c28dd4ba5bc2fe9141f44aeed7d59a07012018.zip
gcc-98c28dd4ba5bc2fe9141f44aeed7d59a07012018.tar.gz
gcc-98c28dd4ba5bc2fe9141f44aeed7d59a07012018.tar.bz2
Kill IDENTIFIER_NAMESPACE_BINDINGS
Kill IDENTIFIER_NAMESPACE_BINDINGS * cp-tree.h (lang_identifier): Delete namespace_bindings. (IDENTIFIER_NAMESPACE_BINDINGS): Delete. (lang_decl_ns): Add bindings. (DECL_NAMESPACE_BINDINGS): New. * lex.c (retrofit_lang_decl): Create namespace hash table. * name-lookup.c (find_namespace_slot): Change to use hash-map. * ptree.c (cxx_print_binding): Delete. (cxx_print_identifier): Remove NAMESPACE_BINDING printing. From-SVN: r248694
Diffstat (limited to 'gcc/cp/lex.c')
-rw-r--r--gcc/cp/lex.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/lex.c b/gcc/cp/lex.c
index a9c38ff..1b4eb35 100644
--- a/gcc/cp/lex.c
+++ b/gcc/cp/lex.c
@@ -566,8 +566,12 @@ retrofit_lang_decl (tree t, int sel)
memcpy (ld, DECL_LANG_SPECIFIC (t), oldsize);
ld->u.base.selector = sel;
-
DECL_LANG_SPECIFIC (t) = ld;
+
+ if (sel == 2)
+ /* Who'd create a namespace, only to put nothing in it? */
+ ld->u.ns.bindings = hash_map<lang_identifier *, tree>::create_ggc (499);
+
if (current_lang_name == lang_name_cplusplus
|| decl_linkage (t) == lk_none)
SET_DECL_LANGUAGE (t, lang_cplusplus);