From patchwork Wed Apr 27 05:21:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Merrill X-Patchwork-Id: 92983 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 9B6A21007D7 for ; Wed, 27 Apr 2011 15:22:05 +1000 (EST) Received: (qmail 12411 invoked by alias); 27 Apr 2011 05:22:03 -0000 Received: (qmail 12401 invoked by uid 22791); 27 Apr 2011 05:22:02 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, SPF_HELO_PASS, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Apr 2011 05:21:47 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p3R5Ll0V028150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 27 Apr 2011 01:21:47 -0400 Received: from [127.0.0.1] (ovpn-113-113.phx2.redhat.com [10.3.113.113]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p3R5Lk9c001796 for ; Wed, 27 Apr 2011 01:21:46 -0400 Message-ID: <4DB7A7EA.4020805@redhat.com> Date: Wed, 27 Apr 2011 01:21:46 -0400 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: gcc-patches List Subject: C++ PATCH to debug_tree for TYPENAME_TYPE and IDENTIFIER Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org A couple of small changes. It was inconvenient that debug_tree didn't print the name of a TYPENAME_TYPE, and once it did I noticed that the indentation on the IDENTIFIER bits was wrong. Tested x86_64-pc-linux-gnu, applied to trunk. commit 3d660910ee64db8a09091482370ccc1162b781ca Author: Jason Merrill Date: Tue Apr 26 18:02:47 2011 -0400 * ptree.c (cxx_print_type) [TYPENAME_TYPE]: Dump fullname. (cxx_print_identifier): Correct indentation. diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c index 49dc82b..a4c3ed5 100644 --- a/gcc/cp/ptree.c +++ b/gcc/cp/ptree.c @@ -99,6 +99,11 @@ cxx_print_type (FILE *file, tree node, int indent) print_node (file, "expr", DECLTYPE_TYPE_EXPR (node), indent + 4); return; + case TYPENAME_TYPE: + print_node (file, "fullname", TYPENAME_TYPE_FULLNAME (node), + indent + 4); + return; + default: return; } @@ -175,12 +180,12 @@ cxx_print_identifier (FILE *file, tree node, int indent) if (indent == 0) fprintf (file, " "); else - indent_to (file, indent); + indent_to (file, indent + 4); cxx_print_binding (file, IDENTIFIER_NAMESPACE_BINDINGS (node), "bindings"); if (indent == 0) fprintf (file, " "); else - indent_to (file, indent); + indent_to (file, indent + 4); cxx_print_binding (file, IDENTIFIER_BINDING (node), "local bindings"); print_node (file, "label", IDENTIFIER_LABEL_VALUE (node), indent + 4); print_node (file, "template", IDENTIFIER_TEMPLATE (node), indent + 4);