summaryrefslogtreecommitdiff
path: root/gcc/lto-symtab.c
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-30 18:45:47 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2010-04-30 18:45:47 +0000
commitdb8fd1eff43d287ad7748ab9a6f292f442aa6481 (patch)
treec8bfb3ab53ad9de726a6028c6f5e6252ae0079e2 /gcc/lto-symtab.c
parentbf7d782b8086dcafc5f0ee10f18e7657e942cd45 (diff)
downloadgcc-db8fd1eff43d287ad7748ab9a6f292f442aa6481.tar.gz
* lto-symtab.c (lto_symtab_resolve_can_prevail_p): Chose var with varpool.
(lto_symtab_merge_decls_1): Remove logic looking for an initializer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158944 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-symtab.c')
-rw-r--r--gcc/lto-symtab.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c
index a35d82fe3d4..b5430a5ab74 100644
--- a/gcc/lto-symtab.c
+++ b/gcc/lto-symtab.c
@@ -406,11 +406,7 @@ lto_symtab_resolve_can_prevail_p (lto_symtab_entry_t e)
/* A variable should have a size. */
else if (TREE_CODE (e->decl) == VAR_DECL)
- return (DECL_SIZE (e->decl) != NULL_TREE
- /* The C++ frontend retains TREE_STATIC on the declaration
- of foo_ in struct Foo { static Foo *foo_; }; but it is
- not a definition. g++.dg/lto/20090315_0.C. */
- && !DECL_EXTERNAL (e->decl));
+ return (e->vnode && e->vnode->finalized);
gcc_unreachable ();
}
@@ -588,17 +584,6 @@ lto_symtab_merge_decls_1 (void **slot, void *data ATTRIBUTE_UNUSED)
while (!prevailing->vnode
&& prevailing->next)
prevailing = prevailing->next;
- /* We do not stream varpool nodes, so the first decl has to
- be good enough for now.
- ??? For QOI choose a variable with readonly initializer
- if there is one. This matches C++
- struct Foo { static const int i = 1; }; without a real
- definition. */
- if (TREE_CODE (prevailing->decl) == VAR_DECL)
- while (!(TREE_READONLY (prevailing->decl)
- && DECL_INITIAL (prevailing->decl))
- && prevailing->next)
- prevailing = prevailing->next;
}
/* Move it first in the list. */