diff mbox

[pph] Stream locations in LAMBDA_EXPR and STATIC_ASSERT_EXPR (issue4876042)

Message ID 20110811181318.28F3C1DA1C1@topo.tor.corp.google.com
State New
Headers show

Commit Message

Diego Novillo Aug. 11, 2011, 6:13 p.m. UTC
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 mbox

Patch

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);