summaryrefslogtreecommitdiff
path: root/gcc/cgraph.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cgraph.c')
-rw-r--r--gcc/cgraph.c25
1 files changed, 7 insertions, 18 deletions
diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index 8ea8ae93714..a71f68ca4e0 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -1846,20 +1846,7 @@ cgraph_node::local_info (tree decl)
cgraph_node *node = get (decl);
if (!node)
return NULL;
- return &node->local;
-}
-
-/* Return global info for the compiled function. */
-
-cgraph_global_info *
-cgraph_node::global_info (tree decl)
-{
- gcc_assert (TREE_CODE (decl) == FUNCTION_DECL
- && symtab->global_info_ready);
- cgraph_node *node = get (decl);
- if (!node)
- return NULL;
- return &node->global;
+ return &node->ultimate_alias_target ()->local;
}
/* Return local info for the compiled function. */
@@ -1869,11 +1856,13 @@ cgraph_node::rtl_info (tree decl)
{
gcc_assert (TREE_CODE (decl) == FUNCTION_DECL);
cgraph_node *node = get (decl);
- if (!node
- || (decl != current_function_decl
- && !TREE_ASM_WRITTEN (node->decl)))
+ if (!node)
+ return NULL;
+ node = node->ultimate_alias_target ();
+ if (node->decl != current_function_decl
+ && !TREE_ASM_WRITTEN (node->decl))
return NULL;
- return &node->rtl;
+ return &node->ultimate_alias_target ()->rtl;
}
/* Return a string describing the failure REASON. */