* [pph] Reformat (issue4515140)
@ 2011-05-25 19:22 Lawrence Crowl
0 siblings, 0 replies; only message in thread
From: Lawrence Crowl @ 2011-05-25 19:22 UTC (permalink / raw)
To: reply, dnovillo, gcc-patches
In pph_stream_read_tree and pph_stream_write_tree, reformat for style.
This step was skipped in the last patch to make diffs more sensible.
Index: gcc/cp/ChangeLog.pph
2011-05-25 Lawrence Crowl <crowl@google.com>
* pph-streamer-in.c (pph_stream_read_tree): Reformat for style.
* pph-streamer-out.c (pph_stream_write_tree): Reformat for style.
Index: gcc/cp/pph-streamer-in.c
===================================================================
--- gcc/cp/pph-streamer-in.c (revision 174166)
+++ gcc/cp/pph-streamer-in.c (working copy)
@@ -820,39 +820,33 @@ pph_stream_read_tree (struct lto_input_b
case PARM_DECL:
case USING_DECL:
case VAR_DECL:
- {
/* FIXME pph: Should we merge DECL_INITIAL into lang_specific? */
DECL_INITIAL (expr) = pph_input_tree (stream);
- pph_stream_read_lang_specific (stream, expr);
+ pph_stream_read_lang_specific (stream, expr);
break;
- }
case FUNCTION_DECL:
- {
DECL_INITIAL (expr) = pph_input_tree (stream);
pph_stream_read_lang_specific (stream, expr);
- DECL_SAVED_TREE (expr) = pph_input_tree (stream);
+ DECL_SAVED_TREE (expr) = pph_input_tree (stream);
break;
- }
case TYPE_DECL:
- {
DECL_INITIAL (expr) = pph_input_tree (stream);
pph_stream_read_lang_specific (stream, expr);
- DECL_ORIGINAL_TYPE (expr) = pph_input_tree (stream);
+ DECL_ORIGINAL_TYPE (expr) = pph_input_tree (stream);
break;
- }
case STATEMENT_LIST:
- {
- HOST_WIDE_INT i, num_trees = pph_input_uint (stream);
- for (i = 0; i < num_trees; i++)
- {
- tree stmt = pph_input_tree (stream);
- append_to_statement_list (stmt, &expr);
- }
+ {
+ HOST_WIDE_INT i, num_trees = pph_input_uint (stream);
+ for (i = 0; i < num_trees; i++)
+ {
+ tree stmt = pph_input_tree (stream);
+ append_to_statement_list (stmt, &expr);
+ }
+ }
break;
- }
case ARRAY_TYPE:
case BOOLEAN_TYPE:
@@ -870,62 +864,48 @@ pph_stream_read_tree (struct lto_input_b
case REFERENCE_TYPE:
case VECTOR_TYPE:
case VOID_TYPE:
- {
pph_stream_read_lang_type (stream, expr);
break;
- }
case QUAL_UNION_TYPE:
case RECORD_TYPE:
case UNION_TYPE:
- {
- pph_stream_read_lang_type (stream, expr);
- {
- TYPE_BINFO (expr) = pph_input_tree (stream);
- }
+ pph_stream_read_lang_type (stream, expr);
+ TYPE_BINFO (expr) = pph_input_tree (stream);
break;
- }
case OVERLOAD:
- {
OVL_FUNCTION (expr) = pph_input_tree (stream);
break;
- }
case IDENTIFIER_NODE:
- {
- struct lang_identifier *id = LANG_IDENTIFIER_CAST (expr);
- id->namespace_bindings = pph_stream_read_cxx_binding (stream);
- id->bindings = pph_stream_read_cxx_binding (stream);
- id->class_template_info = pph_input_tree (stream);
- id->label_value = pph_input_tree (stream);
+ {
+ struct lang_identifier *id = LANG_IDENTIFIER_CAST (expr);
+ id->namespace_bindings = pph_stream_read_cxx_binding (stream);
+ id->bindings = pph_stream_read_cxx_binding (stream);
+ id->class_template_info = pph_input_tree (stream);
+ id->label_value = pph_input_tree (stream);
+ }
break;
- }
case BASELINK:
- {
BASELINK_BINFO (expr) = pph_input_tree (stream);
BASELINK_FUNCTIONS (expr) = pph_input_tree (stream);
BASELINK_ACCESS_BINFO (expr) = pph_input_tree (stream);
break;
- }
case TEMPLATE_DECL:
- {
DECL_INITIAL (expr) = pph_input_tree (stream);
pph_stream_read_lang_specific (stream, expr);
DECL_TEMPLATE_RESULT (expr) = pph_input_tree (stream);
DECL_TEMPLATE_PARMS (expr) = pph_input_tree (stream);
DECL_CONTEXT (expr) = pph_input_tree (stream);
break;
- }
case TEMPLATE_INFO:
- {
TI_TYPEDEFS_NEEDING_ACCESS_CHECKING (expr)
= pph_stream_read_qual_use_vec (stream);
break;
- }
case TREE_LIST:
case TREE_BINFO:
Index: gcc/cp/pph-streamer-out.c
===================================================================
--- gcc/cp/pph-streamer-out.c (revision 174166)
+++ gcc/cp/pph-streamer-out.c (working copy)
@@ -821,45 +821,39 @@ pph_stream_write_tree (struct output_blo
case PARM_DECL:
case USING_DECL:
case VAR_DECL:
- {
/* FIXME pph: Should we merge DECL_INITIAL into lang_specific? */
pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
- pph_stream_write_lang_specific (stream, expr, ref_p);
+ pph_stream_write_lang_specific (stream, expr, ref_p);
break;
- }
case FUNCTION_DECL:
- {
pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
pph_stream_write_lang_specific (stream, expr, ref_p);
- pph_output_tree_or_ref_1 (stream, DECL_SAVED_TREE (expr), ref_p, 3);
+ pph_output_tree_or_ref_1 (stream, DECL_SAVED_TREE (expr), ref_p, 3);
break;
- }
case TYPE_DECL:
- {
pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
pph_stream_write_lang_specific (stream, expr, ref_p);
- pph_output_tree_or_ref_1 (stream, DECL_ORIGINAL_TYPE (expr), ref_p, 3);
+ pph_output_tree_or_ref_1 (stream, DECL_ORIGINAL_TYPE (expr), ref_p, 3);
break;
- }
case STATEMENT_LIST:
- {
- tree_stmt_iterator i;
- unsigned num_stmts;
+ {
+ tree_stmt_iterator i;
+ unsigned num_stmts;
- /* Compute and write the number of statements in the list. */
- for (num_stmts = 0, i = tsi_start (expr); !tsi_end_p (i); tsi_next (&i))
- num_stmts++;
+ /* Compute and write the number of statements in the list. */
+ for (num_stmts = 0, i = tsi_start (expr); !tsi_end_p (i); tsi_next (&i))
+ num_stmts++;
- pph_output_uint (stream, num_stmts);
+ pph_output_uint (stream, num_stmts);
- /* Write the statements. */
- for (i = tsi_start (expr); !tsi_end_p (i); tsi_next (&i))
- pph_output_tree_or_ref_1 (stream, tsi_stmt (i), ref_p, 3);
+ /* Write the statements. */
+ for (i = tsi_start (expr); !tsi_end_p (i); tsi_next (&i))
+ pph_output_tree_or_ref_1 (stream, tsi_stmt (i), ref_p, 3);
+ }
break;
- }
case ARRAY_TYPE:
case BOOLEAN_TYPE:
@@ -877,48 +871,37 @@ pph_stream_write_tree (struct output_blo
case REFERENCE_TYPE:
case VECTOR_TYPE:
case VOID_TYPE:
- {
pph_stream_write_lang_type (stream, expr, ref_p);
break;
- }
case QUAL_UNION_TYPE:
case RECORD_TYPE:
case UNION_TYPE:
- {
- pph_stream_write_lang_type (stream, expr, ref_p);
- {
- pph_output_tree_or_ref_1 (stream, TYPE_BINFO (expr), ref_p, 3);
- }
+ pph_stream_write_lang_type (stream, expr, ref_p);
+ pph_output_tree_or_ref_1 (stream, TYPE_BINFO (expr), ref_p, 3);
break;
- }
case OVERLOAD:
- {
pph_output_tree_or_ref_1 (stream, OVL_CURRENT (expr), ref_p, 3);
break;
- }
case IDENTIFIER_NODE:
- {
- struct lang_identifier *id = LANG_IDENTIFIER_CAST (expr);
- pph_stream_write_cxx_binding (stream, id->namespace_bindings, ref_p);
- pph_stream_write_cxx_binding (stream, id->bindings, ref_p);
- pph_output_tree_or_ref_1 (stream, id->class_template_info, ref_p, 3);
- pph_output_tree_or_ref_1 (stream, id->label_value, ref_p, 3);
+ {
+ struct lang_identifier *id = LANG_IDENTIFIER_CAST (expr);
+ pph_stream_write_cxx_binding (stream, id->namespace_bindings, ref_p);
+ pph_stream_write_cxx_binding (stream, id->bindings, ref_p);
+ pph_output_tree_or_ref_1 (stream, id->class_template_info, ref_p, 3);
+ pph_output_tree_or_ref_1 (stream, id->label_value, ref_p, 3);
+ }
break;
- }
case BASELINK:
- {
pph_output_tree_or_ref_1 (stream, BASELINK_BINFO (expr), ref_p, 3);
pph_output_tree_or_ref_1 (stream, BASELINK_FUNCTIONS (expr), ref_p, 3);
pph_output_tree_or_ref_1 (stream, BASELINK_ACCESS_BINFO (expr), ref_p, 3);
break;
- }
case TEMPLATE_DECL:
- {
pph_output_tree_or_ref_1 (stream, DECL_INITIAL (expr), ref_p, 3);
pph_stream_write_lang_specific (stream, expr, ref_p);
pph_output_tree_or_ref_1 (stream, DECL_TEMPLATE_RESULT (expr), ref_p, 3);
@@ -926,14 +909,11 @@ pph_stream_write_tree (struct output_blo
pph_output_tree_or_ref_1 (stream, DECL_CONTEXT (expr), ref_p, 3);
pph_output_uchar (stream, DECL_MEMBER_TEMPLATE_P (expr));
break;
- }
case TEMPLATE_INFO:
- {
pph_stream_write_qual_use_vec (stream,
TI_TYPEDEFS_NEEDING_ACCESS_CHECKING (expr), ref_p);
break;
- }
case TREE_LIST:
case TREE_BINFO:
--
This patch is available for review at http://codereview.appspot.com/4515140
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-25 17:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-25 19:22 [pph] Reformat (issue4515140) Lawrence Crowl
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).