summaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-19 19:06:38 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-19 19:06:38 +0000
commit83a23b050c3e304cdbfe91ddcad06d3a20aff63f (patch)
tree7833337ec015312bc0a4f42179ae921a7ef30c24 /gcc/cgraphunit.c
parentd0b5b304bfbdd19e465aa12c0603d96c9d841a9a (diff)
downloadgcc-83a23b050c3e304cdbfe91ddcad06d3a20aff63f.tar.gz
PR objc/43061
* cgraphunit.c (process_function_and_variable_attributes): Check DECL_PRESERVE_P instead of looking up attribute "used". * ipa-pure-const.c (check_decl): Likewise. * ipa-reference.c (has_proper_scope_for_analysis): Likewise. * ipa-type-escape.c (has_proper_scope_for_analysis): Likewise. * config/sol2.c (solaris_insert_attributes): Set DECL_PRESERVE_P instead of attribute "used". * config/sol2-c.c (solaris_pragma_init): Likewise. (solaris_pragma_fini): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156907 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index ec7f9d8fc33..37eee71231f 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -885,7 +885,7 @@ process_function_and_variable_attributes (struct cgraph_node *first,
for (node = cgraph_nodes; node != first; node = node->next)
{
tree decl = node->decl;
- if (lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
+ if (DECL_PRESERVE_P (decl))
{
mark_decl_referenced (decl);
if (node->local.finalized)
@@ -904,7 +904,7 @@ process_function_and_variable_attributes (struct cgraph_node *first,
for (vnode = varpool_nodes; vnode != first_var; vnode = vnode->next)
{
tree decl = vnode->decl;
- if (lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
+ if (DECL_PRESERVE_P (decl))
{
mark_decl_referenced (decl);
vnode->force_output = true;