diff options
author | Nathan Sidwell <nathan@acm.org> | 2020-12-03 08:58:44 -0800 |
---|---|---|
committer | Nathan Sidwell <nathan@acm.org> | 2020-12-03 09:01:43 -0800 |
commit | eb8c2b30b947dd8a2012ee658117bea05e46bc85 (patch) | |
tree | a5a9723ff925a0da5742df39794d98de9c89f098 /gcc/cp/decl.c | |
parent | 756f55e62f73eb32787497eb9e564d4b21a6e637 (diff) | |
download | gcc-eb8c2b30b947dd8a2012ee658117bea05e46bc85.zip gcc-eb8c2b30b947dd8a2012ee658117bea05e46bc85.tar.gz gcc-eb8c2b30b947dd8a2012ee658117bea05e46bc85.tar.bz2 |
c++: templatey type creation
This patch makes a couple of type-creation routines available to
modules. That needs to create unbound template parms, and canonical
template parms.
gcc/cp/
* cp-tree.h (make_unbound_class_template_raw): Declare.
(canonical_type_parameter): Declare.
* decl.c (make_unbound_class_template_raw): Break out of ...
(make_unboud_class_template): ... here. Call it.
* pt.c (canonical_type_parameter): Externalize. Refactor & set
structural_equality for type parms.
Diffstat (limited to 'gcc/cp/decl.c')
-rw-r--r-- | gcc/cp/decl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 0cf84a0..a28e792 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -4132,6 +4132,14 @@ make_unbound_class_template (tree context, tree name, tree parm_list, return tmpl; } + return make_unbound_class_template_raw (context, name, parm_list); +} + +/* Build an UNBOUND_CLASS_TEMPLATE. */ + +tree +make_unbound_class_template_raw (tree context, tree name, tree parm_list) +{ /* Build the UNBOUND_CLASS_TEMPLATE. */ tree t = cxx_make_type (UNBOUND_CLASS_TEMPLATE); TYPE_CONTEXT (t) = FROB_CONTEXT (context); |