diff options
author | Jan Hubicka <jh@suse.cz> | 2018-08-29 19:07:35 +0200 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2018-08-29 17:07:35 +0000 |
commit | b9a0baa9f941537de5ea2c431830a8da33692d88 (patch) | |
tree | 25887dd9b3314ef17b07e5bd3abee62451db85a4 /gcc/tree.c | |
parent | d176b500dcd39c8158ffd445e2aa5de09e06bac1 (diff) | |
download | gcc-b9a0baa9f941537de5ea2c431830a8da33692d88.zip gcc-b9a0baa9f941537de5ea2c431830a8da33692d88.tar.gz gcc-b9a0baa9f941537de5ea2c431830a8da33692d88.tar.bz2 |
tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): Do not stream DECL_VINDEX.
* tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
Do not stream DECL_VINDEX.
* tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
* tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
(decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
From-SVN: r263962
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -5339,12 +5339,7 @@ free_lang_data_in_decl (tree decl) (DECL_CONTEXT (DECL_ABSTRACT_ORIGIN (decl)))) DECL_ABSTRACT_ORIGIN (decl) = NULL_TREE; - /* Sometimes the C++ frontend doesn't manage to transform a temporary - DECL_VINDEX referring to itself into a vtable slot number as it - should. Happens with functions that are copied and then forgotten - about. Just clear it, it won't matter anymore. */ - if (DECL_VINDEX (decl) && !tree_fits_shwi_p (DECL_VINDEX (decl))) - DECL_VINDEX (decl) = NULL_TREE; + DECL_VINDEX (decl) = NULL_TREE; } else if (VAR_P (decl)) { @@ -8989,7 +8984,7 @@ decl_function_context (const_tree decl) C++ should really be fixed to use DECL_CONTEXT for the real context, and use something else for the "virtual context". */ - else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_VINDEX (decl)) + else if (TREE_CODE (decl) == FUNCTION_DECL && DECL_VIRTUAL_P (decl)) context = TYPE_MAIN_VARIANT (TREE_TYPE (TREE_VALUE (TYPE_ARG_TYPES (TREE_TYPE (decl))))); |