Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

Issue 4408045: [pph] Rebuild compilation context from PPH images (3/6) (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years ago by Diego Novillo
Modified:
14 years ago
Reviewers:
CC:
Lawrence Crowl, gcc-patches_gcc.gnu.org
Visibility:
Public.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -2 lines) Patch
M gcc/cp/ChangeLog.pph View 1 chunk +6 lines, -0 lines 0 comments Download
M gcc/cp/pph-streamer-in.c View 1 chunk +2 lines, -1 line 0 comments Download
M gcc/cp/pph-streamer-out.c View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 1
Diego Novillo
14 years ago (2011-04-14 19:41:12 UTC) #1
We were not handling TYPE_DECLs properly.  They were being handled by
the first if, but the second one was an 'else if'.  Sigh.

Tested on x86_64.


Diego.

    	* pph-streamer-in.c (pph_stream_read_tree): Fix handling of
    	TYPE_DECLs.
    	* pph-streamer-out.c (pph_stream_write_tree): Likewise.

diff --git a/gcc/cp/ChangeLog.pph b/gcc/cp/ChangeLog.pph
index f717f85..7a92278 100644
--- a/gcc/cp/ChangeLog.pph
+++ b/gcc/cp/ChangeLog.pph
@@ -1,3 +1,9 @@
+2011-04-14  Diego Novillo  <dnovillo@google.com>
+
+	* pph-streamer-in.c (pph_stream_read_tree): Fix handling of
+	TYPE_DECLs.
+	* pph-streamer-out.c (pph_stream_write_tree): Likewise.
+
 2011-04-13  Diego Novillo  <dnovillo@google.com>
 
 	* name-lookup.c (pph_stream_write_binding_table): Handle
diff --git a/gcc/cp/pph-streamer-in.c b/gcc/cp/pph-streamer-in.c
index 335fab6..c98c2f4 100644
--- a/gcc/cp/pph-streamer-in.c
+++ b/gcc/cp/pph-streamer-in.c
@@ -784,7 +784,8 @@ pph_stream_read_tree (struct lto_input_block *ib
ATTRIBUTE_UNUSED,
 	  if (TREE_CODE (expr) == FUNCTION_DECL)
 	    DECL_SAVED_TREE (expr) = pph_input_tree (stream);
 	}
-      else if (TREE_CODE (expr) == TYPE_DECL)
+
+      if (TREE_CODE (expr) == TYPE_DECL)
 	DECL_ORIGINAL_TYPE (expr) = pph_input_tree (stream);
     }
   else if (TREE_CODE (expr) == STATEMENT_LIST)
diff --git a/gcc/cp/pph-streamer-out.c b/gcc/cp/pph-streamer-out.c
index 16c8543..babf751 100644
--- a/gcc/cp/pph-streamer-out.c
+++ b/gcc/cp/pph-streamer-out.c
@@ -789,7 +789,8 @@ pph_stream_write_tree (struct output_block *ob, tree expr,
bool ref_p)
 	  if (TREE_CODE (expr) == FUNCTION_DECL)
 	    pph_output_tree_aux (stream, DECL_SAVED_TREE (expr), ref_p);
 	}
-      else if (TREE_CODE (expr) == TYPE_DECL)
+
+      if (TREE_CODE (expr) == TYPE_DECL)
 	pph_output_tree (stream, DECL_ORIGINAL_TYPE (expr), ref_p);
     }
   else if (TREE_CODE (expr) == STATEMENT_LIST)


--
This patch is available for review at http://codereview.appspot.com/4408045
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b