- /* If the user told us it is used, then it must be so. */
- if (lookup_attribute ("used", DECL_ATTRIBUTES (decl)))
- return true;
-
- /* ??? If the assembler name is set by hand, it is possible to assemble
- the name later after finalizing the function and the fact is noticed
- in assemble_name then. This is arguably a bug. */
- if (DECL_ASSEMBLER_NAME_SET_P (decl)
- && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
- return true;
-
- /* If we decided it was needed before, but at the time we didn't have
- the definition available, then it's still needed. */
- if (node->needed)
- return true;
-
- /* Externally visible variables must be output. The exception is
- COMDAT variables that must be output only when they are needed. */
- if (TREE_PUBLIC (decl) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl))
- return true;
-
- if (flag_unit_at_a_time)
- return false;
-
- /* If not doing unit at a time, then we'll only defer this function
- if its marked for inlining. Otherwise we want to emit it now. */
-
- /* We want to emit COMDAT variables only when absolutely necessary. */
- if (DECL_COMDAT (decl))
- return false;
- return true;
-}
-
-void
-cgraph_varpool_finalize_decl (tree decl)
-{
- struct cgraph_varpool_node *node = cgraph_varpool_node (decl);
-
- /* The first declaration of a variable that comes through this function
- decides whether it is global (in C, has external linkage)
- or local (in C, has internal linkage). So do nothing more
- if this function has already run. */
- if (node->finalized)
- {
- if (cgraph_global_info_ready || !flag_unit_at_a_time)
- cgraph_varpool_assemble_pending_decls ();
- return;
- }
- if (node->needed)
- cgraph_varpool_enqueue_needed_node (node);
- node->finalized = true;
-
- if (decide_is_variable_needed (node, decl))
- cgraph_varpool_mark_needed_node (node);
- /* Since we reclaim unrechable nodes at the end of every language
- level unit, we need to be conservative about possible entry points
- there. */
- if (TREE_PUBLIC (decl) && !DECL_COMDAT (decl) && !DECL_EXTERNAL (decl))
- cgraph_varpool_mark_needed_node (node);
- if (cgraph_global_info_ready || !flag_unit_at_a_time)
- cgraph_varpool_assemble_pending_decls ();
+ struct cgraph_asm_node *node;
+
+ node = GGC_CNEW (struct cgraph_asm_node);
+ node->asm_str = asm_str;
+ node->order = cgraph_order++;
+ node->next = NULL;
+ if (cgraph_asm_nodes == NULL)
+ cgraph_asm_nodes = node;
+ else
+ cgraph_asm_last_node->next = node;
+ cgraph_asm_last_node = node;
+ return node;