diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-12 09:12:47 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-06-12 09:12:47 +0000 |
commit | 9e9c3e92e9fbf4254b4ae185aeb345e2e08629e5 (patch) | |
tree | f90b96685d9ff8fb7b5722fdf8b1ff094b9c8b96 /gcc/symtab.c | |
parent | e9b152974632d5f7c0303e03da34bb4077f37b8e (diff) | |
download | gcc-9e9c3e92e9fbf4254b4ae185aeb345e2e08629e5.tar.gz |
* lto-symtab.c (lto_symtab_merge_symbols): Populate symtab hashtable.
* cgraph.h (varpool_create_empty_node): Declare.
* lto-cgraph.c (input_node, input_varpool_node): Forcingly create
duplicated nodes.
* symtab.c (symtab_unregister_node): Be lax about missin entries
in node hash.
(symtab_get_node): Update comment.
* varpool.c (varpool_create_empty_node): Break out from ...
(varpool_node_for_decl): ... here.
* lto-streamer.h (lto_file_decl_data): Add RESOLUTION_MAP.
* lto.c (register_resolution): Take lto_file_data argument.
(lto_register_var_decl_in_symtab,
lto_register_function_decl_in_symtab): Update.
(read_cgraph_and_symbols): Update resolution_map handling.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@199990 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/symtab.c')
-rw-r--r-- | gcc/symtab.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/symtab.c b/gcc/symtab.c index 7a02270c257..0ce44a9180d 100644 --- a/gcc/symtab.c +++ b/gcc/symtab.c @@ -269,7 +269,11 @@ symtab_unregister_node (symtab_node node) node->symbol.previous = NULL; slot = htab_find_slot (symtab_hash, node, NO_INSERT); - if (*slot == node) + + /* During LTO symtab merging we temporarily corrupt decl to symtab node + hash. */ + gcc_assert ((slot && *slot) || in_lto_p); + if (slot && *slot && *slot == node) { symtab_node replacement_node = NULL; if (cgraph_node *cnode = dyn_cast <cgraph_node> (node)) @@ -291,10 +295,14 @@ symtab_get_node (const_tree decl) symtab_node *slot; struct symtab_node_base key; +#ifdef ENABLE_CHECKING + /* Check that we are called for sane type of object - functions + and static or external variables. */ gcc_checking_assert (TREE_CODE (decl) == FUNCTION_DECL || (TREE_CODE (decl) == VAR_DECL && (TREE_STATIC (decl) || DECL_EXTERNAL (decl) || in_lto_p))); +#endif if (!symtab_hash) return NULL; |