diff mbox

[pph] Rename two pph_start_record functions adding in/out. (issue4629049)

Message ID 20110617231154.71D891C1E31@gchare.mtv.corp.google.com
State New
Headers show

Commit Message

Gab Charette June 17, 2011, 11:11 p.m. UTC
There were two pph_start_record functions, one for the in part, one for the out
part. I renamed them to have different names to avoid confusion for the reader
(and it also makes it easier for tags).

2011-06-17  Gabriel Charette  <gchare@google.com>

	* gcc/cp/pph-streamer-in.c (pph_in_start_record): 
	Rename from pph_start_record. Update all users.
	* gcc/cp/pph-streamer-out.c (pph_out_start_record): 
	Rename from pph_start_record. Update all users.


--
This patch is available for review at http://codereview.appspot.com/4629049
diff mbox

Patch

diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c
index b3c2ac9..cd611c7 100644
--- a/gcc/cp/pph-streamer-in.c
+++ b/gcc/cp/pph-streamer-in.c
@@ -192,7 +192,7 @@  pph_init_read (pph_stream *stream)
    materialized structure.  */
 
 static inline enum pph_record_marker
-pph_start_record (pph_stream *stream, unsigned *cache_ix)
+pph_in_start_record (pph_stream *stream, unsigned *cache_ix)
 {
   enum pph_record_marker marker;
 
@@ -211,7 +211,7 @@  pph_start_record (pph_stream *stream, unsigned *cache_ix)
 
 
 /* Return a shared pointer from the streamer cache in STREAM.  This is
-   called when pph_start_record returns PPH_RECORD_SHARED.  It means
+   called when pph_in_start_record returns PPH_RECORD_SHARED.  It means
    that the data structure we are about to read has been instantiated
    before and is present in the streamer cache.  */
 
@@ -330,7 +330,7 @@  pph_in_cxx_binding_1 (pph_stream *stream)
   enum pph_record_marker marker;
   unsigned ix;
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
@@ -378,7 +378,7 @@  pph_in_class_binding (pph_stream *stream)
   enum pph_record_marker marker;
   unsigned ix;
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
@@ -401,7 +401,7 @@  pph_in_label_binding (pph_stream *stream)
   enum pph_record_marker marker;
   unsigned ix;
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
@@ -425,7 +425,7 @@  pph_in_binding_level (pph_stream *stream)
   struct bitpack_d bp;
   enum pph_record_marker marker;
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
@@ -495,7 +495,7 @@  pph_in_c_language_function (pph_stream *stream)
   enum pph_record_marker marker;
   unsigned ix;
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
@@ -521,7 +521,7 @@  pph_in_language_function (pph_stream *stream)
   enum pph_record_marker marker;
   unsigned ix;
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
@@ -614,7 +614,7 @@  pph_in_struct_function (pph_stream *stream)
 
   gcc_assert (stream->data_in != NULL);
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return NULL;
 
@@ -713,7 +713,7 @@  pph_in_lang_specific (pph_stream *stream, tree decl)
   enum pph_record_marker marker;
   unsigned ix;
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return;
 
@@ -828,7 +828,7 @@  pph_in_sorted_fields_type (pph_stream *stream)
   enum pph_record_marker marker;
   unsigned ix;
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
@@ -908,7 +908,7 @@  pph_in_lang_type_class (pph_stream *stream,
   ltc->typeinfo_var = pph_in_tree (stream);
   ltc->vbases = pph_in_tree_vec (stream);
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_START)
     {
       ltc->nested_udts = pph_in_binding_table (stream);
@@ -950,7 +950,7 @@  pph_in_lang_type (pph_stream *stream)
   enum pph_record_marker marker;
   unsigned ix;
 
-  marker = pph_start_record (stream, &ix);
+  marker = pph_in_start_record (stream, &ix);
   if (marker == PPH_RECORD_END)
     return NULL;
   else if (marker == PPH_RECORD_SHARED)
diff --git a/gcc/cp/pph-streamer-out.c b/gcc/cp/pph-streamer-out.c
index 49847a9..83e90c3 100644
--- a/gcc/cp/pph-streamer-out.c
+++ b/gcc/cp/pph-streamer-out.c
@@ -200,7 +200,7 @@  pph_flush_buffers (pph_stream *stream)
    cache, write a shared-record marker and return false.  */
 
 static inline bool
-pph_start_record (pph_stream *stream, void *data)
+pph_out_start_record (pph_stream *stream, void *data)
 {
   if (data)
     {
@@ -320,7 +320,7 @@  pph_out_cxx_binding_1 (pph_stream *stream, cxx_binding *cb, bool ref_p)
 {
   struct bitpack_d bp;
 
-  if (!pph_start_record (stream, cb))
+  if (!pph_out_start_record (stream, cb))
     return;
 
   pph_out_tree_or_ref (stream, cb->value, ref_p);
@@ -361,7 +361,7 @@  static void
 pph_out_class_binding (pph_stream *stream, cp_class_binding *cb,
 			        bool ref_p)
 {
-  if (!pph_start_record (stream, cb))
+  if (!pph_out_start_record (stream, cb))
     return;
 
   pph_out_cxx_binding (stream, cb->base, ref_p);
@@ -375,7 +375,7 @@  pph_out_class_binding (pph_stream *stream, cp_class_binding *cb,
 static void
 pph_out_label_binding (pph_stream *stream, cp_label_binding *lb, bool ref_p)
 {
-  if (!pph_start_record (stream, lb))
+  if (!pph_out_start_record (stream, lb))
     return;
 
   pph_out_tree_or_ref (stream, lb->label, ref_p);
@@ -444,7 +444,7 @@  pph_out_binding_level (pph_stream *stream, struct cp_binding_level *bl,
   cp_label_binding *sl;
   struct bitpack_d bp;
 
-  if (!pph_start_record (stream, bl))
+  if (!pph_out_start_record (stream, bl))
     return;
 
   pph_out_chain_filtered (stream, bl->names, ref_p, NO_BUILTINS);
@@ -500,7 +500,7 @@  pph_out_c_language_function (pph_stream *stream,
 				      struct c_language_function *clf,
 				      bool ref_p)
 {
-  if (!pph_start_record (stream, clf))
+  if (!pph_out_start_record (stream, clf))
     return;
 
   pph_out_tree_vec (stream, clf->x_stmt_tree.x_cur_stmt_list, ref_p);
@@ -518,7 +518,7 @@  pph_out_language_function (pph_stream *stream,
 {
   struct bitpack_d bp;
 
-  if (!pph_start_record (stream, lf))
+  if (!pph_out_start_record (stream, lf))
     return;
 
   pph_out_c_language_function (stream, &lf->base, ref_p);
@@ -621,7 +621,7 @@  pph_out_struct_function (pph_stream *stream, struct function *fn, bool ref_p)
 {
   struct pph_tree_info pti;
 
-  if (!pph_start_record (stream, fn))
+  if (!pph_out_start_record (stream, fn))
     return;
 
   output_struct_function_base (stream->ob, fn);
@@ -712,7 +712,7 @@  pph_out_lang_specific (pph_stream *stream, tree decl, bool ref_p)
   struct lang_decl_base *ldb;
 
   ld = DECL_LANG_SPECIFIC (decl);
-  if (!pph_start_record (stream, ld))
+  if (!pph_out_start_record (stream, ld))
     return;
     
   /* Write all the fields in lang_decl_base.  */
@@ -792,7 +792,7 @@  pph_out_sorted_fields_type (pph_stream *stream,
 {
   int i;
 
-  if (!pph_start_record (stream, sft))
+  if (!pph_out_start_record (stream, sft))
     return;
 
   pph_out_uint (stream, sft->len);
@@ -864,7 +864,7 @@  pph_out_lang_type_class (pph_stream *stream,
   pph_out_tree_or_ref (stream, ltc->vtables, ref_p);
   pph_out_tree_or_ref (stream, ltc->typeinfo_var, ref_p);
   pph_out_tree_vec (stream, ltc->vbases, ref_p);
-  if (pph_start_record (stream, ltc->nested_udts))
+  if (pph_out_start_record (stream, ltc->nested_udts))
     pph_out_binding_table (stream, ltc->nested_udts, ref_p);
   pph_out_tree_or_ref (stream, ltc->as_base, ref_p);
   pph_out_tree_vec (stream, ltc->pure_virtuals, ref_p);
@@ -901,7 +901,7 @@  pph_out_lang_type (pph_stream *stream, tree type, bool ref_p)
   struct lang_type *lt;
 
   lt = TYPE_LANG_SPECIFIC (type);
-  if (!pph_start_record (stream, lt))
+  if (!pph_out_start_record (stream, lt))
     return;
 
   pph_out_lang_type_header (stream, &lt->u.h);