aboutsummaryrefslogtreecommitdiff
path: root/gcc/sreal.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2017-04-26 11:57:38 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2017-04-26 09:57:38 +0000
commit8a267096506388a0165d869daa42607b8bf96583 (patch)
tree5982acc57285f0be2e98859be6970af45dc91e8d /gcc/sreal.c
parentf9726baa97f95d73f1ead290e4465824c4bcc673 (diff)
downloadgcc-8a267096506388a0165d869daa42607b8bf96583.zip
gcc-8a267096506388a0165d869daa42607b8bf96583.tar.gz
gcc-8a267096506388a0165d869daa42607b8bf96583.tar.bz2
sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and data-streamer.h
* sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and data-streamer.h (sreal::stream_out, sreal::stream_in): New. * sreal.h (sreal::stream_out, sreal::stream_in): Declare. From-SVN: r247276
Diffstat (limited to 'gcc/sreal.c')
-rw-r--r--gcc/sreal.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/sreal.c b/gcc/sreal.c
index 72d5891..3993e27 100644
--- a/gcc/sreal.c
+++ b/gcc/sreal.c
@@ -53,6 +53,11 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "sreal.h"
#include "selftest.h"
+#include "backend.h"
+#include "tree.h"
+#include "gimple.h"
+#include "cgraph.h"
+#include "data-streamer.h"
/* Print the content of struct sreal. */
@@ -236,6 +241,26 @@ sreal::operator/ (const sreal &other) const
return r;
}
+/* Stream sreal value to OB. */
+
+void
+sreal::stream_out (struct output_block *ob)
+{
+ streamer_write_hwi (ob, m_sig);
+ streamer_write_hwi (ob, m_exp);
+}
+
+/* Read sreal value from IB. */
+
+sreal
+sreal::stream_in (struct lto_input_block *ib)
+{
+ sreal val;
+ val.m_sig = streamer_read_hwi (ib);
+ val.m_exp = streamer_read_hwi (ib);
+ return val;
+}
+
#if CHECKING_P
namespace selftest {