aboutsummaryrefslogtreecommitdiff
path: root/gcc/data-streamer-out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/data-streamer-out.c')
-rw-r--r--gcc/data-streamer-out.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc/data-streamer-out.c b/gcc/data-streamer-out.c
index e476530..3dd423b 100644
--- a/gcc/data-streamer-out.c
+++ b/gcc/data-streamer-out.c
@@ -375,3 +375,30 @@ streamer_write_data_stream (struct lto_output_stream *obs, const void *data,
}
}
+/* Emit the physical representation of wide_int VAL to output block OB. */
+
+void
+streamer_write_wide_int (struct output_block *ob, const wide_int &val)
+{
+ int len = val.get_len ();
+
+ streamer_write_uhwi (ob, val.get_precision ());
+ streamer_write_uhwi (ob, len);
+ for (int i = 0; i < len; i++)
+ streamer_write_hwi (ob, val.elt (i));
+}
+
+/* Emit the physical representation of widest_int W to output block OB. */
+
+void
+streamer_write_widest_int (struct output_block *ob,
+ const widest_int &w)
+{
+ int len = w.get_len ();
+
+ streamer_write_uhwi (ob, w.get_precision ());
+ streamer_write_uhwi (ob, len);
+ for (int i = 0; i < len; i++)
+ streamer_write_hwi (ob, w.elt (i));
+}
+