diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2014-06-25 01:14:26 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2014-06-24 23:14:26 +0000 |
commit | aaf8a23ef3ff2055dde65871b438883ecc067bb0 (patch) | |
tree | 4eb562a7b31cab4e4e7d8a28aa86e3deca8f76e5 /gcc/lto/lto.c | |
parent | ecc6304308f19c159a9df27d0bd5a66f5acbba83 (diff) | |
download | gcc-aaf8a23ef3ff2055dde65871b438883ecc067bb0.zip gcc-aaf8a23ef3ff2055dde65871b438883ecc067bb0.tar.gz gcc-aaf8a23ef3ff2055dde65871b438883ecc067bb0.tar.bz2 |
class.c (check_methods, [...]): Guard VINDEX checks by FUNCTION_DECL check.
* class.c (check_methods, create_vtable_ptr, determine_key_method,
add_vcall_offset_vtbl_entries_1): Guard VINDEX checks by FUNCTION_DECL check.
* cp-tree.h (lang_decl_ns): Add ns_using and ns_users.
(DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): Use lang_decl_ns.
(DECL_NAMESPACE_ASSOCIATIONS): Use DECL_INITIAL.
(DECL_TEMPLATE_INSTANTIATIONS): Use DECL_SIZE_UNIT.
* tree.c (find_decls_types_r): Do not check DECL_VINDEX for TYPE_DECL.
* tree.h (DECL_VINDEX, DECL_SAVED_TREE): Restrict to DECL_FUNCTION.
* tree-core.h (tree_decl_non_common): Move saved_tree and vindex...
(tree_function_decl): ... here.
* tree-streamer-out.c (write_ts_decl_non_common_tree_pointers): Move
streaming of vindex to ...
(write_ts_function_decl_tree_pointers): ... here.
* tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
Do not stream DECL_VINDEX.
(lto_input_ts_function_decl_tree_pointers): Stream it here.
* lto.c (mentions_vars_p_decl_non_common): Move DECL_VINDEX check to ..
(mentions_vars_p_function): ... here.
(compare_tree_sccs_1): Update VINDEX checks.
(lto_fixup_prevailing_decls): Likewise.
From-SVN: r211960
Diffstat (limited to 'gcc/lto/lto.c')
-rw-r--r-- | gcc/lto/lto.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/lto/lto.c b/gcc/lto/lto.c index 5c4acc5..f5ed5c3 100644 --- a/gcc/lto/lto.c +++ b/gcc/lto/lto.c @@ -777,7 +777,6 @@ mentions_vars_p_decl_non_common (tree t) return true; CHECK_NO_VAR (DECL_ARGUMENT_FLD (t)); CHECK_NO_VAR (DECL_RESULT_FLD (t)); - CHECK_NO_VAR (DECL_VINDEX (t)); return false; } @@ -788,6 +787,7 @@ mentions_vars_p_function (tree t) { if (mentions_vars_p_decl_non_common (t)) return true; + CHECK_NO_VAR (DECL_VINDEX (t)); CHECK_VAR (DECL_FUNCTION_PERSONALITY (t)); return false; } @@ -1512,7 +1512,6 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map) } else if (code == TYPE_DECL) compare_tree_edges (DECL_ORIGINAL_TYPE (t1), DECL_ORIGINAL_TYPE (t2)); - compare_tree_edges (DECL_VINDEX (t1), DECL_VINDEX (t2)); } if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS)) @@ -1538,6 +1537,7 @@ compare_tree_sccs_1 (tree t1, tree t2, tree **map) { compare_tree_edges (DECL_FUNCTION_PERSONALITY (t1), DECL_FUNCTION_PERSONALITY (t2)); + compare_tree_edges (DECL_VINDEX (t1), DECL_VINDEX (t2)); /* DECL_FUNCTION_SPECIFIC_TARGET is not yet created. We compare the attribute list instead. */ compare_tree_edges (DECL_FUNCTION_SPECIFIC_OPTIMIZATION (t1), @@ -2714,10 +2714,12 @@ lto_fixup_prevailing_decls (tree t) { LTO_NO_PREVAIL (DECL_ARGUMENT_FLD (t)); LTO_NO_PREVAIL (DECL_RESULT_FLD (t)); - LTO_NO_PREVAIL (DECL_VINDEX (t)); } if (CODE_CONTAINS_STRUCT (code, TS_FUNCTION_DECL)) - LTO_SET_PREVAIL (DECL_FUNCTION_PERSONALITY (t)); + { + LTO_SET_PREVAIL (DECL_FUNCTION_PERSONALITY (t)); + LTO_NO_PREVAIL (DECL_VINDEX (t)); + } if (CODE_CONTAINS_STRUCT (code, TS_FIELD_DECL)) { LTO_SET_PREVAIL (DECL_FIELD_OFFSET (t)); |