From: Jason Merrill <jason@redhat.com>
To: Patrick Palka <ppalka@redhat.com>, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c++: improve dumping of templated decls
Date: Wed, 22 Sep 2021 16:05:37 -0400 [thread overview]
Message-ID: <89184515-311c-b461-cb5f-886adcac6f4b@redhat.com> (raw)
In-Reply-To: <20210922155657.3279594-1-ppalka@redhat.com>
On 9/22/21 11:56, Patrick Palka wrote:
> This makes the dumping routines output more information for templated
> decls, to help streamline debugging.
>
> Tested on x86_64-pc-linux-gnu, does this look OK for trunk?
OK.
> gcc/cp/ChangeLog:
>
> * ptree.c (cxx_print_decl): Dump the DECL_TEMPLATE_RESULT of
> a TEMPLATE_DECL. Dump the DECL_TEMPLATE_INFO rather than just
> printing its pointer.
> ---
> gcc/cp/ptree.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c
> index 7f140f5f06b..1dcd764af01 100644
> --- a/gcc/cp/ptree.c
> +++ b/gcc/cp/ptree.c
> @@ -51,6 +51,7 @@ cxx_print_decl (FILE *file, tree node, int indent)
> }
> else if (TREE_CODE (node) == TEMPLATE_DECL)
> {
> + print_node (file, "result", DECL_TEMPLATE_RESULT (node), indent + 4);
> print_node (file, "parms", DECL_TEMPLATE_PARMS (node), indent + 4);
> indent_to (file, indent + 3);
> fprintf (file, " full-name \"%s\"",
> @@ -115,13 +116,8 @@ cxx_print_decl (FILE *file, tree node, int indent)
>
> if (VAR_OR_FUNCTION_DECL_P (node)
> && DECL_TEMPLATE_INFO (node))
> - {
> - if (need_indent)
> - indent_to (file, indent + 3);
> - fprintf (file, " template-info %p",
> - (void *) DECL_TEMPLATE_INFO (node));
> - need_indent = false;
> - }
> + print_node (file, "template-info", DECL_TEMPLATE_INFO (node),
> + indent + 4);
> }
>
> void
>
prev parent reply other threads:[~2021-09-22 20:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-22 15:56 Patrick Palka
2021-09-22 20:05 ` Jason Merrill [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=89184515-311c-b461-cb5f-886adcac6f4b@redhat.com \
--to=jason@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ppalka@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).