From: crowl@google.com (Lawrence Crowl)
To: reply@codereview.appspotmail.com, dnovillo@google.com,
gcc-patches@gcc.gnu.org
Subject: [pph] DECL_INITIAL instead of DECL_ARG_TYPE (issue4442102)
Date: Fri, 29 Apr 2011 21:46:00 -0000 [thread overview]
Message-ID: <20110429212846.1A14F2225D2@jade.mtv.corp.google.com> (raw)
In the pph file, save and restore DECL_INITIAL instead of just
PARM_DECL DECL_ARG_TYPE.
Index: gcc/cp/ChangeLog.pph
2011-04-29 Lawrence Crowl <crowl@google.com>
* pph-streamer-out.c (pph_stream_write_tree): Write DECL_INITIAL
instead of PARM_DECL DECL_ARG_TYPE.
* pph-streamer-in.c (pph_stream_read_tree): Read DECL_INITIAL
instead of PARM_DECL DECL_ARG_TYPE.
Index: gcc/cp/pph-streamer-in.c
===================================================================
--- gcc/cp/pph-streamer-in.c (revision 173189)
+++ gcc/cp/pph-streamer-in.c (working copy)
@@ -783,6 +783,8 @@ pph_stream_read_tree (struct lto_input_b
if (DECL_P (expr))
{
+ DECL_INITIAL (expr) = pph_input_tree (stream);
+
if (TREE_CODE (expr) == FUNCTION_DECL
|| TREE_CODE (expr) == NAMESPACE_DECL
|| TREE_CODE (expr) == PARM_DECL
@@ -791,8 +793,6 @@ pph_stream_read_tree (struct lto_input_b
pph_stream_read_lang_specific (stream, expr);
if (TREE_CODE (expr) == FUNCTION_DECL)
DECL_SAVED_TREE (expr) = pph_input_tree (stream);
- else if (TREE_CODE (expr) == PARM_DECL)
- DECL_ARG_TYPE (expr) = pph_input_tree (stream);
}
if (TREE_CODE (expr) == TYPE_DECL)
Index: gcc/cp/pph-streamer-out.c
===================================================================
--- gcc/cp/pph-streamer-out.c (revision 173189)
+++ gcc/cp/pph-streamer-out.c (working copy)
@@ -787,6 +787,8 @@ pph_stream_write_tree (struct output_blo
if (DECL_P (expr))
{
+ pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
+
if (TREE_CODE (expr) == FUNCTION_DECL
|| TREE_CODE (expr) == NAMESPACE_DECL
|| TREE_CODE (expr) == PARM_DECL
@@ -796,8 +798,6 @@ pph_stream_write_tree (struct output_blo
if (TREE_CODE (expr) == FUNCTION_DECL)
pph_output_tree_or_ref_1 (stream, DECL_SAVED_TREE (expr), ref_p, 3);
- else if (TREE_CODE (expr) == PARM_DECL)
- pph_output_tree_or_ref_1 (stream, DECL_ARG_TYPE (expr), ref_p, 3);
}
if (TREE_CODE (expr) == TYPE_DECL)
--
This patch is available for review at http://codereview.appspot.com/4442102
next reply other threads:[~2011-04-29 21:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 21:46 Lawrence Crowl [this message]
2011-04-29 22:23 ` Diego Novillo
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=20110429212846.1A14F2225D2@jade.mtv.corp.google.com \
--to=crowl@google.com \
--cc=dnovillo@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=reply@codereview.appspotmail.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).