aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-streamer-out.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2011-12-13 21:59:39 +0000
committerEric Botcazou <ebotcazou@adacore.com>2011-12-13 21:59:39 +0000
commit5af18ff8582aab3da6419c05d33ca21c15a133fc (patch)
tree94f0149b723a3c60aa550ad41671de4d896fe032 /gcc/lto-streamer-out.c
parentc3f68aa23ca07ef83d08ed7d983aff63ba8e442b (diff)
* lto-streamer-out.c (write_symbol): Use proper 64-bit host type.
* lto-cgraph.c (input_cgraph_opt_section): Use 'int' for offsets. * lto-streamer-in.c (lto_read_body): Likewise. (lto_input_toplevel_asms): Likewise. * lto-section-in.c (lto_create_simple_input_block): Likewise. * ipa-inline-analysis.c (inline_read_section): Likewise. * ipa-prop.c (ipa_prop_read_section): Likewise. * df.h (DF_NOTE): Fix typo in comment. lto/ * lto.h (lto_parse_hex): Delete. * lto.c (lto_read_decls): Use 'int' for offsets. (lto_parse_hex): Make static and return proper 64-bit host type. (lto_resolution_read): Use proper 64-bit host type. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@182310 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r--gcc/lto-streamer-out.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c
index 80bf9e9fd4f..9593134fb02 100644
--- a/gcc/lto-streamer-out.c
+++ b/gcc/lto-streamer-out.c
@@ -1290,7 +1290,7 @@ write_symbol (struct streamer_tree_cache_d *cache,
enum gcc_plugin_symbol_kind kind;
enum gcc_plugin_symbol_visibility visibility;
unsigned slot_num;
- uint64_t size;
+ unsigned HOST_WIDEST_INT size;
const char *comdat;
unsigned char c;
@@ -1348,7 +1348,7 @@ write_symbol (struct streamer_tree_cache_d *cache,
when symbol has attribute (visibility("hidden")) specified.
targetm.binds_local_p check DECL_VISIBILITY_SPECIFIED and gets this
right. */
-
+
if (DECL_EXTERNAL (t)
&& !targetm.binds_local_p (t))
visibility = GCCPV_DEFAULT;
@@ -1370,14 +1370,9 @@ write_symbol (struct streamer_tree_cache_d *cache,
}
if (kind == GCCPK_COMMON
- && DECL_SIZE (t)
- && TREE_CODE (DECL_SIZE (t)) == INTEGER_CST)
- {
- size = (HOST_BITS_PER_WIDE_INT >= 64)
- ? (uint64_t) int_size_in_bytes (TREE_TYPE (t))
- : (((uint64_t) TREE_INT_CST_HIGH (DECL_SIZE_UNIT (t))) << 32)
- | TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
- }
+ && DECL_SIZE_UNIT (t)
+ && TREE_CODE (DECL_SIZE_UNIT (t)) == INTEGER_CST)
+ size = TREE_INT_CST_LOW (DECL_SIZE_UNIT (t));
else
size = 0;