aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2019-11-22 22:38:44 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2019-11-22 22:38:44 +0100
commitdf418f1d3cba53a4d3d20c2f640a250dd4c1bfa3 (patch)
treef66e383f251a8499f4d34c9d8662bca6f50413af /gcc/cp
parent839e636a9abe65f4880fb5d9609f8ee5ff277fe5 (diff)
downloadgcc-df418f1d3cba53a4d3d20c2f640a250dd4c1bfa3.zip
gcc-df418f1d3cba53a4d3d20c2f640a250dd4c1bfa3.tar.gz
gcc-df418f1d3cba53a4d3d20c2f640a250dd4c1bfa3.tar.bz2
re PR c++/92458 (Constraints do not work with precompiled headers)
PR c++/92458 * tree-hash-traits.h (tree_decl_hash, tree_ssa_name_hash, tree_hash): Move to ... * tree.h (tree_decl_hash, tree_ssa_name_hash, tree_hash): ... here. (struct decl_tree_cache_traits, struct type_tree_cache_traits): New types. (decl_tree_cache_map, tree_tree_cache_map): New typedefs. * init.c (nsdmi_inst): Change type to decl_tree_cache_map * from tree_cache_map *. * constraint.cc (decl_constraints): Likewise. * decl.c (get_tuple_decomp_init): Likewise. * pt.c (defarg_inst, explicit_specifier_map): Likewise. (tsubst_default_argument, store_explicit_specifier): Use decl_tree_cache_map::create_ggc rather than tree_cache_map::create_ggc. * cp-objcp-common.c (debug_type_map): Change type to type_tree_cache_map * from tree_cache_map *. * g++.dg/pch/pr92458.C: New test. * g++.dg/pch/pr92458.Hs: New test. From-SVN: r278633
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog14
-rw-r--r--gcc/cp/constraint.cc2
-rw-r--r--gcc/cp/cp-objcp-common.c2
-rw-r--r--gcc/cp/decl.c2
-rw-r--r--gcc/cp/init.c2
-rw-r--r--gcc/cp/pt.c8
6 files changed, 22 insertions, 8 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index cd1cd17..93cf9e9 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,17 @@
+2019-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/92458
+ * init.c (nsdmi_inst): Change type to
+ decl_tree_cache_map * from tree_cache_map *.
+ * constraint.cc (decl_constraints): Likewise.
+ * decl.c (get_tuple_decomp_init): Likewise.
+ * pt.c (defarg_inst, explicit_specifier_map): Likewise.
+ (tsubst_default_argument, store_explicit_specifier): Use
+ decl_tree_cache_map::create_ggc rather than
+ tree_cache_map::create_ggc.
+ * cp-objcp-common.c (debug_type_map): Change type to
+ type_tree_cache_map * from tree_cache_map *.
+
2019-11-21 Marek Polacek <polacek@redhat.com>
PR c++/92450 - ICE with invalid nested name specifier.
diff --git a/gcc/cp/constraint.cc b/gcc/cp/constraint.cc
index 00b59a9..171ca4e 100644
--- a/gcc/cp/constraint.cc
+++ b/gcc/cp/constraint.cc
@@ -1113,7 +1113,7 @@ build_constraints (tree tr, tree dr)
/* A mapping from declarations to constraint information. */
-static GTY ((cache)) tree_cache_map *decl_constraints;
+static GTY ((cache)) decl_tree_cache_map *decl_constraints;
/* Returns the template constraints of declaration T. If T is not
constrained, return NULL_TREE. Note that T must be non-null. */
diff --git a/gcc/cp/cp-objcp-common.c b/gcc/cp/cp-objcp-common.c
index b9bc2c6..d168e2a 100644
--- a/gcc/cp/cp-objcp-common.c
+++ b/gcc/cp/cp-objcp-common.c
@@ -123,7 +123,7 @@ cxx_types_compatible_p (tree x, tree y)
return same_type_ignoring_top_level_qualifiers_p (x, y);
}
-static GTY((cache)) tree_cache_map *debug_type_map;
+static GTY((cache)) type_tree_cache_map *debug_type_map;
/* Return a type to use in the debug info instead of TYPE, or NULL_TREE to
keep TYPE. */
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 86e38f4..2612072 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -7998,7 +7998,7 @@ get_tuple_decomp_init (tree decl, unsigned i)
/* It's impossible to recover the decltype of a tuple decomposition variable
based on the actual type of the variable, so store it in a hash table. */
-static GTY((cache)) tree_cache_map *decomp_type_table;
+static GTY((cache)) decl_tree_cache_map *decomp_type_table;
tree
lookup_decomp_type (tree v)
diff --git a/gcc/cp/init.c b/gcc/cp/init.c
index c620b05..aa48f80 100644
--- a/gcc/cp/init.c
+++ b/gcc/cp/init.c
@@ -548,7 +548,7 @@ perform_target_ctor (tree init)
/* Return the non-static data initializer for FIELD_DECL MEMBER. */
-static GTY((cache)) tree_cache_map *nsdmi_inst;
+static GTY((cache)) decl_tree_cache_map *nsdmi_inst;
tree
get_nsdmi (tree member, bool in_ctor, tsubst_flags_t complain)
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 064fe5b..78b78ba 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -13272,7 +13272,7 @@ tsubst_aggr_type (tree t,
}
}
-static GTY((cache)) tree_cache_map *defarg_inst;
+static GTY((cache)) decl_tree_cache_map *defarg_inst;
/* Substitute into the default argument ARG (a default argument for
FN), which has the indicated TYPE. */
@@ -13346,7 +13346,7 @@ tsubst_default_argument (tree fn, int parmnum, tree type, tree arg,
if (arg != error_mark_node && !cp_unevaluated_operand)
{
if (!defarg_inst)
- defarg_inst = tree_cache_map::create_ggc (37);
+ defarg_inst = decl_tree_cache_map::create_ggc (37);
defarg_inst->put (parm, arg);
}
@@ -13383,7 +13383,7 @@ tsubst_default_arguments (tree fn, tsubst_flags_t complain)
}
/* Hash table mapping a FUNCTION_DECL to its dependent explicit-specifier. */
-static GTY((cache)) tree_cache_map *explicit_specifier_map;
+static GTY((cache)) decl_tree_cache_map *explicit_specifier_map;
/* Store a pair to EXPLICIT_SPECIFIER_MAP. */
@@ -13391,7 +13391,7 @@ void
store_explicit_specifier (tree v, tree t)
{
if (!explicit_specifier_map)
- explicit_specifier_map = tree_cache_map::create_ggc (37);
+ explicit_specifier_map = decl_tree_cache_map::create_ggc (37);
DECL_HAS_DEPENDENT_EXPLICIT_SPEC_P (v) = true;
explicit_specifier_map->put (v, t);
}