From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id 089093858010 for ; Wed, 22 Sep 2021 20:05:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 089093858010 Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-416-FhVBK8siNcuuvotJYySexQ-1; Wed, 22 Sep 2021 16:05:39 -0400 X-MC-Unique: FhVBK8siNcuuvotJYySexQ-1 Received: by mail-qv1-f72.google.com with SMTP id p12-20020ad4496c000000b0037a535cb8b2so13708404qvy.15 for ; Wed, 22 Sep 2021 13:05:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=i7TtTPYsS6nVIi36A3dcUKG0xhpVTTCtbzvokyTTt2A=; b=wqFN3iRsBrkPR6DyYoJGUUtQE5CoRjgUuUIg5pK1Rl6iIOyE/H7m/i96QUNvCAK9kf dSGKr8iDZ44r3a/Jvyr7L/MDkocynl4DZmwUs9GlELuqaomLpWd6PyGdyCzKydKbmwJI Pyzjcwyam1zHqoAeDypFbBkPHxOyFHa1EBb/CFlfiTD/a9t6OtQRhNBeGLDPRR4ty4zm vPf/B6u54WpNamY5EPQFHZuyVP/ySk9ec25El/gWYMKFqU4x6pE0gSJGoA/jy3sbRBkU TUObb3QJFf7gL50FTppiRPlDm7GU47nGwX/55lGIkFlJ01BnuDXGo1LnUgQ8q81D9VdY pAXw== X-Gm-Message-State: AOAM533Qq7+stywVTSvzMfrUT/582jo5fqNyWBrmTB833zlgNCv57vVg t6U4hDCtOREsETJpjhc6WPj2MAl86rr1h+JeOhqUfsGf2vrIAl6TJGnL1pbeH9Kqe68Zi7csmTx YTC13XhiWLpHbyhJUuQ== X-Received: by 2002:a37:a64b:: with SMTP id p72mr1127347qke.459.1632341139059; Wed, 22 Sep 2021 13:05:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBhR+7nxrpzEyVODl9sZFHqwMQ9SV1qOm1t59v8E4r5Mt3Mlj34hLr1wPDB/tCBfD8/mrZdw== X-Received: by 2002:a37:a64b:: with SMTP id p72mr1127323qke.459.1632341138839; Wed, 22 Sep 2021 13:05:38 -0700 (PDT) Received: from [192.168.1.149] (130-44-159-43.s15913.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.159.43]) by smtp.gmail.com with ESMTPSA id c17sm2075321qtn.65.2021.09.22.13.05.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Sep 2021 13:05:38 -0700 (PDT) Message-ID: <89184515-311c-b461-cb5f-886adcac6f4b@redhat.com> Date: Wed, 22 Sep 2021 16:05:37 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.1 Subject: Re: [PATCH] c++: improve dumping of templated decls To: Patrick Palka , gcc-patches@gcc.gnu.org References: <20210922155657.3279594-1-ppalka@redhat.com> From: Jason Merrill In-Reply-To: <20210922155657.3279594-1-ppalka@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-13.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Sep 2021 20:05:42 -0000 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 >