diff options
Diffstat (limited to 'gcc/lto-streamer-out.c')
-rw-r--r-- | gcc/lto-streamer-out.c | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/gcc/lto-streamer-out.c b/gcc/lto-streamer-out.c index ea0ff177c47..dfcd1357179 100644 --- a/gcc/lto-streamer-out.c +++ b/gcc/lto-streamer-out.c @@ -642,9 +642,8 @@ DFS_write_tree_body (struct output_block *ob, FOR_EACH_VEC_SAFE_ELT (BINFO_BASE_ACCESSES (expr), i, t) DFS_follow_tree_edge (t); - DFS_follow_tree_edge (BINFO_INHERITANCE_CHAIN (expr)); - DFS_follow_tree_edge (BINFO_SUBVTT_INDEX (expr)); - DFS_follow_tree_edge (BINFO_VPTR_INDEX (expr)); + /* Do not walk BINFO_INHERITANCE_CHAIN, BINFO_SUBVTT_INDEX + and BINFO_VPTR_INDEX; these are used by C++ FE only. */ } if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR)) @@ -748,7 +747,6 @@ hash_tree (struct streamer_tree_cache_d *cache, tree t) v = iterative_hash_host_wide_int (DECL_ALIGN (t), v); if (code == LABEL_DECL) { - v = iterative_hash_host_wide_int (DECL_ERROR_ISSUED (t), v); v = iterative_hash_host_wide_int (EH_LANDING_PAD_NR (t), v); v = iterative_hash_host_wide_int (LABEL_DECL_UID (t), v); } @@ -781,23 +779,27 @@ hash_tree (struct streamer_tree_cache_d *cache, tree t) if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS)) { - v = iterative_hash_host_wide_int (DECL_DEFER_OUTPUT (t) - | (DECL_COMMON (t) << 1) - | (DECL_DLLIMPORT_P (t) << 2) - | (DECL_WEAK (t) << 3) - | (DECL_SEEN_IN_BIND_EXPR_P (t) << 4) - | (DECL_COMDAT (t) << 5) + v = iterative_hash_host_wide_int ((DECL_COMMON (t)) + | (DECL_DLLIMPORT_P (t) << 1) + | (DECL_WEAK (t) << 2) + | (DECL_SEEN_IN_BIND_EXPR_P (t) << 3) + | (DECL_COMDAT (t) << 4) | (DECL_VISIBILITY_SPECIFIED (t) << 6), v); v = iterative_hash_host_wide_int (DECL_VISIBILITY (t), v); if (code == VAR_DECL) { + /* DECL_IN_TEXT_SECTION is set during final asm output only. */ v = iterative_hash_host_wide_int (DECL_HARD_REGISTER (t) - | (DECL_IN_TEXT_SECTION (t) << 1) - | (DECL_IN_CONSTANT_POOL (t) << 2), + | (DECL_IN_CONSTANT_POOL (t) << 1), v); v = iterative_hash_host_wide_int (DECL_TLS_MODEL (t), v); } + if (TREE_CODE (t) == FUNCTION_DECL) + v = iterative_hash_host_wide_int (DECL_FINAL_P (t) + | (DECL_CXX_CONSTRUCTOR_P (t) << 1) + | (DECL_CXX_DESTRUCTOR_P (t) << 2), + v); if (VAR_OR_FUNCTION_DECL_P (t)) v = iterative_hash_host_wide_int (DECL_INIT_PRIORITY (t), v); } @@ -838,7 +840,10 @@ hash_tree (struct streamer_tree_cache_d *cache, tree t) | (TYPE_USER_ALIGN (t) << 5) | (TYPE_READONLY (t) << 6), v); if (RECORD_OR_UNION_TYPE_P (t)) - v = iterative_hash_host_wide_int (TYPE_TRANSPARENT_AGGR (t), v); + { + v = iterative_hash_host_wide_int (TYPE_TRANSPARENT_AGGR (t) + | (TYPE_FINAL_P (t) << 1), v); + } else if (code == ARRAY_TYPE) v = iterative_hash_host_wide_int (TYPE_NONALIASED_COMPONENT (t), v); v = iterative_hash_host_wide_int (TYPE_PRECISION (t), v); @@ -1021,9 +1026,8 @@ hash_tree (struct streamer_tree_cache_d *cache, tree t) visit (BINFO_VPTR_FIELD (t)); FOR_EACH_VEC_SAFE_ELT (BINFO_BASE_ACCESSES (t), i, b) visit (b); - visit (BINFO_INHERITANCE_CHAIN (t)); - visit (BINFO_SUBVTT_INDEX (t)); - visit (BINFO_VPTR_INDEX (t)); + /* Do not walk BINFO_INHERITANCE_CHAIN, BINFO_SUBVTT_INDEX + and BINFO_VPTR_INDEX; these are used by C++ FE only. */ } if (CODE_CONTAINS_STRUCT (code, TS_CONSTRUCTOR)) |