diff options
author | ak <ak@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-01 17:03:56 +0000 |
---|---|---|
committer | ak <ak@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-09-01 17:03:56 +0000 |
commit | 99afbe939664c43a1504a6a98910c398ccd37ac2 (patch) | |
tree | 064dbf63a148604e479e053c3b0c4f5af02cbefa /gcc/lto-streamer-in.c | |
parent | cef2cf9642ff80c4caef6af4c07a930812760c78 (diff) | |
download | gcc-99afbe939664c43a1504a6a98910c398ccd37ac2.tar.gz |
2010-09-01 Andi Kleen <ak@linux.intel.com>
PR lto/45475
* lto-streamer-in.c (lto_input_ts_target_option): Add.
(lto_input_tree_pointers): Call lto_input_ts_target_option.
* lto-streamer-out: (lto_output_ts_target_option): Add.
(lto_output_tree_pointers): Call lto_output_ts_target_option.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163740 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-in.c')
-rw-r--r-- | gcc/lto-streamer-in.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gcc/lto-streamer-in.c b/gcc/lto-streamer-in.c index 9ee15108fae..14d87ed20fd 100644 --- a/gcc/lto-streamer-in.c +++ b/gcc/lto-streamer-in.c @@ -2197,6 +2197,23 @@ lto_input_ts_constructor_tree_pointers (struct lto_input_block *ib, } +/* Input a TS_TARGET_OPTION tree from IB into EXPR. */ + +static void +lto_input_ts_target_option (struct lto_input_block *ib, tree expr) +{ + unsigned i, len; + struct bitpack_d bp; + struct cl_target_option *t = TREE_TARGET_OPTION (expr); + + bp = lto_input_bitpack (ib); + len = sizeof (struct cl_target_option); + for (i = 0; i < len; i++) + ((unsigned char *)t)[i] = bp_unpack_value (&bp, 8); + if (bp_unpack_value (&bp, 32) != 0x12345678) + fatal_error ("cl_target_option size mismatch in LTO reader and writer"); +} + /* Helper for lto_input_tree. Read all pointer fields in EXPR from input block IB. DATA_IN contains tables and descriptors for the file being read. */ @@ -2281,9 +2298,7 @@ lto_input_tree_pointers (struct lto_input_block *ib, struct data_in *data_in, } if (CODE_CONTAINS_STRUCT (code, TS_TARGET_OPTION)) - { - sorry ("target optimization options not supported yet"); - } + lto_input_ts_target_option (ib, expr); } |