From 106fe4aaa3e3372bef2e117fe195035c0ac9e872 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Wed, 3 Jul 2019 17:42:53 +0000 Subject: [PATCH] module.cc (struct unnamed_entity): GTY it. gcc/cp/ * module.cc (struct unnamed_entity): GTY it. (unnamed_map): Not a GTY object. From-SVN: r273014 --- ChangeLog.modules | 4 ++++ gcc/cp/module.cc | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog.modules b/ChangeLog.modules index 9fe385697c84..99ee53a34059 100644 --- a/ChangeLog.modules +++ b/ChangeLog.modules @@ -1,5 +1,9 @@ 2019-07-03 Nathan Sidwell + gcc/cp/ + * module.cc (struct unnamed_entity): GTY it. + (unnamed_map): Not a GTY object. + gcc/cp/ * module.cc (trees_{in,out}::fn_parms): Rename to ... (trees_{in,out}::fn_arg_types): ... this. diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index 977deda92d76..32e263bb5b85 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -3122,7 +3122,7 @@ static loc_spans spans; /********************************************************************/ /* Unnamed declarations. (a) voldemort types, (b) instantiations. */ -struct unnamed_entity +struct GTY(()) unnamed_entity { mc_slot slot; /* The decl, or section number. */ tree ns; /* If a specialization, the ns::id it specializes. */ @@ -17506,7 +17506,7 @@ init_module_processing (cpp_reader *reader) if (!flag_preprocess_only) { - unnamed_map = unnamed_map_t::create_ggc (31); + unnamed_map = new unnamed_map_t (31); specset::table = new specset::hash (400); } @@ -17665,6 +17665,7 @@ finish_module_processing (cpp_reader *reader) modules_hash = NULL; /* Or unnamed entitites. */ + delete unnamed_map; unnamed_map = NULL; unnamed_ary = NULL;