diff options
author | Jason Merrill <jason@redhat.com> | 2015-11-06 10:33:24 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2015-11-06 10:33:24 -0500 |
commit | 9f46fa10f6a25fb07bda3f579bcbbfd9eae2fa81 (patch) | |
tree | c0f12b1f3c61833d808d470a4398991494635a82 | |
parent | 75d86b7d38474531ee3192f6dd8f8db5cdd8f6a2 (diff) | |
download | gcc-9f46fa10f6a25fb07bda3f579bcbbfd9eae2fa81.zip gcc-9f46fa10f6a25fb07bda3f579bcbbfd9eae2fa81.tar.gz gcc-9f46fa10f6a25fb07bda3f579bcbbfd9eae2fa81.tar.bz2 |
pt.c (push_inline_template_parms_recursive): Don't recreate the CONST_DECL.
* pt.c (push_inline_template_parms_recursive): Don't recreate the
CONST_DECL.
From-SVN: r229856
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 17 |
2 files changed, 7 insertions, 15 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 910005d..fbbb6cb 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2015-11-06 Jason Merrill <jason@redhat.com> + + * pt.c (push_inline_template_parms_recursive): Don't recreate the + CONST_DECL. + 2015-11-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com> * init.c (warn_placement_new_too_small): Use %wu format diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 45eda3a..bfea8e2 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -441,21 +441,8 @@ push_inline_template_parms_recursive (tree parmlist, int levels) break; case PARM_DECL: - { - /* Make a CONST_DECL as is done in process_template_parm. - It is ugly that we recreate this here; the original - version built in process_template_parm is no longer - available. */ - tree decl = build_decl (DECL_SOURCE_LOCATION (parm), - CONST_DECL, DECL_NAME (parm), - TREE_TYPE (parm)); - DECL_ARTIFICIAL (decl) = 1; - TREE_CONSTANT (decl) = 1; - TREE_READONLY (decl) = 1; - DECL_INITIAL (decl) = DECL_INITIAL (parm); - SET_DECL_TEMPLATE_PARM_P (decl); - pushdecl (decl); - } + /* Push the CONST_DECL. */ + pushdecl (TEMPLATE_PARM_DECL (DECL_INITIAL (parm))); break; default: |