/* All aliases should be processed at this point. */
gcc_checking_assert (!alias_pairs || !alias_pairs->length ());
-#ifdef ASM_OUTPUT_DEF
- FOR_EACH_DEFINED_FUNCTION (node)
+ if (TARGET_SUPPORTS_ALIASES)
{
- if (node->get_availability () != AVAIL_INTERPOSABLE
- || DECL_EXTERNAL (node->decl)
- || node->has_aliases_p ()
- || lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl)))
- continue;
-
- cgraph_node *alias = 0;
- cgraph_edge *next_edge;
- for (cgraph_edge *e = node->callees; e; e = next_edge)
+ FOR_EACH_DEFINED_FUNCTION (node)
{
- next_edge = e->next_callee;
- /* Recursive function calls usually can't be interposed. */
-
- if (!e->recursive_p ())
+ if (node->get_availability () != AVAIL_INTERPOSABLE
+ || DECL_EXTERNAL (node->decl)
+ || node->has_aliases_p ()
+ || lookup_attribute ("noipa", DECL_ATTRIBUTES (node->decl)))
continue;
- if (!alias)
+ cgraph_node *alias = 0;
+ cgraph_edge *next_edge;
+ for (cgraph_edge *e = node->callees; e; e = next_edge)
{
- alias = dyn_cast<cgraph_node *> (node->noninterposable_alias ());
- gcc_assert (alias && alias != node);
- }
+ next_edge = e->next_callee;
+ /* Recursive function calls usually can't be interposed. */
- e->redirect_callee (alias);
- if (gimple_has_body_p (e->caller->decl))
- {
- push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
- cgraph_edge::redirect_call_stmt_to_callee (e);
- pop_cfun ();
+ if (!e->recursive_p ())
+ continue;
+
+ if (!alias)
+ {
+ alias
+ = dyn_cast<cgraph_node *> (node->noninterposable_alias ());
+ gcc_assert (alias && alias != node);
+ }
+
+ e->redirect_callee (alias);
+ if (gimple_has_body_p (e->caller->decl))
+ {
+ push_cfun (DECL_STRUCT_FUNCTION (e->caller->decl));
+ cgraph_edge::redirect_call_stmt_to_callee (e);
+ pop_cfun ();
+ }
}
}
}
-#endif
FOR_EACH_FUNCTION (node)
{
if (desc->mark < 0)
{
#ifdef ASM_OUTPUT_DEF
+ gcc_checking_assert (TARGET_SUPPORTS_ALIASES);
+
const char *name = XSTR (desc->sym, 0);
char label[256];
char buffer[256 + 32];
IDENTIFIER_POINTER (id),
IDENTIFIER_POINTER (target));
# endif
+ /* If symbol aliases aren't actually supported... */
+ if (!TARGET_SUPPORTS_ALIASES)
+ /* ..., 'ASM_OUTPUT_DEF{,_FROM_DECLS}' better have raised an error. */
+ gcc_checking_assert (seen_error ());
#elif defined (ASM_OUTPUT_WEAK_ALIAS) || defined (ASM_WEAKEN_DECL)
{
const char *name;
if (TREE_PUBLIC (decl))
error ("%qs symbol %q+D must have static linkage", "weakref", decl);
}
- else
+ else if (!TARGET_SUPPORTS_ALIASES)
{
-#if !defined (ASM_OUTPUT_DEF)
# if !defined(ASM_OUTPUT_WEAK_ALIAS) && !defined (ASM_WEAKEN_DECL)
error_at (DECL_SOURCE_LOCATION (decl),
"alias definitions not supported in this configuration");
return;
}
# endif
-#endif
+ gcc_unreachable ();
}
TREE_USED (decl) = 1;
void
default_asm_output_anchor (rtx symbol)
{
+ gcc_checking_assert (TARGET_SUPPORTS_ALIASES);
+
char buffer[100];
sprintf (buffer, "*. + " HOST_WIDE_INT_PRINT_DEC,