diff options
author | Martin Liska <mliska@suse.cz> | 2019-07-22 09:34:32 +0200 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2019-07-22 07:34:32 +0000 |
commit | d1caf05a899bb57d1a96acd4869890991dedca20 (patch) | |
tree | 6b31f36652cb64bc8ed425701a2b3d8cab17aa82 /gcc/lto-streamer.h | |
parent | 2df89b66f1b397c9eacd2078eb6a9b52c2c4853f (diff) | |
download | gcc-d1caf05a899bb57d1a96acd4869890991dedca20.zip gcc-d1caf05a899bb57d1a96acd4869890991dedca20.tar.gz gcc-d1caf05a899bb57d1a96acd4869890991dedca20.tar.bz2 |
Simplify LTO section format.
2019-07-22 Martin Liska <mliska@suse.cz>
* lto-section-in.c (lto_get_section_data):
Use new function get_compression.
* lto-streamer-out.c (produce_lto_section): Use
set_compression to encode compression algorithm.
* lto-streamer.h (struct lto_section): Do not
use bitfields in the format.
From-SVN: r273661
Diffstat (limited to 'gcc/lto-streamer.h')
-rw-r--r-- | gcc/lto-streamer.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/lto-streamer.h b/gcc/lto-streamer.h index 3c35d8a..bf755a6 100644 --- a/gcc/lto-streamer.h +++ b/gcc/lto-streamer.h @@ -394,9 +394,22 @@ struct lto_section { int16_t major_version; int16_t minor_version; - unsigned char slim_object: 1; - lto_compression compression: 4; - int32_t reserved0: 27; + unsigned char slim_object; + + /* Flags is a private field that is not defined publicly. */ + uint16_t flags; + + /* Set compression to FLAGS. */ + inline void set_compression (lto_compression c) + { + flags = c; + } + + /* Get compression from FLAGS. */ + inline lto_compression get_compression () + { + return (lto_compression) flags; + } }; STATIC_ASSERT (sizeof (lto_section) == 8); |