From patchwork Thu Aug 11 18:13:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Diego Novillo X-Patchwork-Id: 109655 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 98A6AB702E for ; Fri, 12 Aug 2011 04:13:39 +1000 (EST) Received: (qmail 3518 invoked by alias); 11 Aug 2011 18:13:37 -0000 Received: (qmail 3509 invoked by uid 22791); 11 Aug 2011 18:13:36 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RP_MATCHES_RCVD, SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Aug 2011 18:13:22 +0000 Received: from hpaq1.eem.corp.google.com (hpaq1.eem.corp.google.com [172.25.149.1]) by smtp-out.google.com with ESMTP id p7BIDKBG006235; Thu, 11 Aug 2011 11:13:20 -0700 Received: from topo.tor.corp.google.com (topo.tor.corp.google.com [172.29.41.2]) by hpaq1.eem.corp.google.com with ESMTP id p7BIDIZQ024741; Thu, 11 Aug 2011 11:13:19 -0700 Received: by topo.tor.corp.google.com (Postfix, from userid 54752) id 28F3C1DA1C1; Thu, 11 Aug 2011 14:13:18 -0400 (EDT) To: reply@codereview.appspotmail.com, crowl@google.com, gchare@google.com, gcc-patches@gcc.gnu.org Subject: [pph] Stream locations in LAMBDA_EXPR and STATIC_ASSERT_EXPR (issue4876042) Message-Id: <20110811181318.28F3C1DA1C1@topo.tor.corp.google.com> Date: Thu, 11 Aug 2011 14:13:18 -0400 (EDT) From: dnovillo@google.com (Diego Novillo) X-System-Of-Record: true X-IsSubscribed: yes 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 No tests depended on this, but since we can now stream locations properly, I added them. Tested on x86_64. Committed. Diego. * pph-streamer-in.c (pph_read_tree_body): Read STATIC_ASSERT_SOURCE_LOCATION and tree_lambda_expr::locus. * pph-streamer-out.c (pph_write_tree_body): Write STATIC_ASSERT_SOURCE_LOCATION and tree_labmda_expr::locus. --- This patch is available for review at http://codereview.appspot.com/4876042 diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c index da7e105..65307f0 100644 --- a/gcc/cp/pph-streamer-in.c +++ b/gcc/cp/pph-streamer-in.c @@ -1715,8 +1715,6 @@ pph_read_tree_body (pph_stream *stream, tree expr) p->orig_level = pph_in_uint (stream); p->num_siblings = pph_in_uint (stream); p->decl = pph_in_tree (stream); - /* FIXME pph: Is TEMPLATE_PARM_PARAMETER_PACK using TREE_LANG_FLAG_0 - already handled? */ } break; @@ -1739,7 +1737,7 @@ pph_read_tree_body (pph_stream *stream, tree expr) pph_in_tree_common (stream, expr); STATIC_ASSERT_CONDITION (expr) = pph_in_tree (stream); STATIC_ASSERT_MESSAGE (expr) = pph_in_tree (stream); - /* FIXME pph: also STATIC_ASSERT_SOURCE_LOCATION (expr). */ + STATIC_ASSERT_SOURCE_LOCATION (expr) = pph_in_location (stream); break; case ARGUMENT_PACK_SELECT: @@ -1760,7 +1758,7 @@ pph_read_tree_body (pph_stream *stream, tree expr) struct tree_lambda_expr *e = (struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (expr); pph_in_tree_common (stream, expr); - /* FIXME pph: also e->locus. */ + e->locus = pph_in_location (stream); e->capture_list = pph_in_tree (stream); e->this_capture = pph_in_tree (stream); e->return_type = pph_in_tree (stream); diff --git a/gcc/cp/pph-streamer-out.c b/gcc/cp/pph-streamer-out.c index faa7211..1b7ab55 100644 --- a/gcc/cp/pph-streamer-out.c +++ b/gcc/cp/pph-streamer-out.c @@ -1551,7 +1551,7 @@ pph_write_tree_body (pph_stream *stream, tree expr) pph_out_tree_common (stream, expr); pph_out_tree_or_ref_1 (stream, STATIC_ASSERT_CONDITION (expr), 3); pph_out_tree_or_ref_1 (stream, STATIC_ASSERT_MESSAGE (expr), 3); - /* FIXME pph: also STATIC_ASSERT_SOURCE_LOCATION (expr). */ + pph_out_location (stream, STATIC_ASSERT_SOURCE_LOCATION (expr)); break; case ARGUMENT_PACK_SELECT: @@ -1572,7 +1572,7 @@ pph_write_tree_body (pph_stream *stream, tree expr) struct tree_lambda_expr *e = (struct tree_lambda_expr *)LAMBDA_EXPR_CHECK (expr); pph_out_tree_common (stream, expr); - /* FIXME pph: also e->locus. */ + pph_out_location (stream, e->locus); pph_out_tree_or_ref_1 (stream, e->capture_list, 3); pph_out_tree_or_ref_1 (stream, e->this_capture, 3); pph_out_tree_or_ref_1 (stream, e->return_type, 3);